Skip to content

Instantly share code, notes, and snippets.

@kyoukaya
Created February 19, 2019 08:55
Show Gist options
  • Save kyoukaya/8a6b011fbf3e217ae91a4a5a8078e987 to your computer and use it in GitHub Desktop.
Save kyoukaya/8a6b011fbf3e217ae91a4a5a8078e987 to your computer and use it in GitHub Desktop.
cs3231 - vscode setup
#!/bin/bash
if [ -z "$1" ]; then
echo "Which kernel to compile?"
exit 1
fi
cd kern/conf
./config "$1"
cd "../compile/$1"
bmake depend
bmake
bmake install
{
"configurations": [
{
"name": "os161",
"includePath": [
"${workspaceFolder}/kern/include",
"${workspaceFolder}/kern/dev",
"${workspaceFolder}/kern/compile/ASST0",
"${workspaceFolder}/kern/compile/ASST0/includelinks"
],
"defines": [
"_KERNEL"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Kernel",
"type": "cppdbg",
"request": "launch",
"miDebuggerPath": "/usr/local/bin/os161-gdb",
"program": "${workspaceFolder}/kern/compile/ASST0/kernel",
"miDebuggerServerAddress": "localhost:16161",
"setupCommands": [
{
"text": "dir ${workspaceFolder}/kern/compile/ASST0"
}
],
"preLaunchTask": "build-run",
"cwd": "${workspaceFolder}",
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"label": "build-run",
"type": "process",
"options": {"cwd": "${workspaceFolder}/../root"},
"args": ["-p 16161", "-w", "kernel"],
"command": "sys161",
"dependsOn": "build-kern",
"problemMatcher": {
"pattern": {
"regexp": "^panic: (.*)$",
"message": 0
},
"background": {
"activeOnStart": false,
"beginsPattern": "^sys161: System/161 release.*$",
"endsPattern": "^sys161: Waiting for debugger connection.*$"
},
},
"isBackground": true
},
{
"label": "build-kern",
"type": "shell",
"command": "./build.sh ASST0"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment