-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathos161.code-workspace
More file actions
208 lines (187 loc) · 7.19 KB
/
os161.code-workspace
File metadata and controls
208 lines (187 loc) · 7.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
{
// Workspace folders
"folders": [
{
"path": "."
},
{
"path": "os161"
}
],
// Workspace settings for VS Code editor and extensions
"settings": {
"editor.tabSize": 4,
"editor.insertSpaces": true,
"search.exclude": {
"**/build": true,
"**/compile": true,
"**/root": true
},
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#604f83",
"activityBar.activeBorder": "#dd4181",
"activityBar.background": "#876ac1",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#dd4181",
"activityBarBadge.foreground": "#e7e7e7",
"statusBar.background": "#604f83",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#592bb4",
"statusBarItem.remoteBackground": "#592bb4",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#604f83",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#443561",
"titleBar.inactiveForeground": "#e7e7e799",
"commandCenter.border": "#e7e7e799"
},
// Settings for .c files
"[c]": {
"editor.rulers": [80],
},
// Disable C/C++ extension intellisense so clangd intellisense works
"C_Cpp.intelliSenseEngine": "disabled",
// Clangd configuration
"clangd.path": "/usr/bin/clangd",
"clangd.arguments": [
"--pretty",
"--compile-commands-dir=${env:WORKSPACE_DIR}"
]
},
// Launch configuration
"launch": {
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// Documentation: https://code.visualstudio.com/docs/editor/debugging
// JSON Reference: https://code.visualstudio.com/docs/editor/debugging#_launchjson-attributes
// Launch configuration to run OS161. Remember to build first with CTRL + SHIFT + B.
{
"name": "Run OS161",
"type": "node",
"request": "attach",
"preLaunchTask": "Run Kernel"
},
// Documentation: https://code.visualstudio.com/docs/cpp/cpp-debug
// JSON Reference: https://code.visualstudio.com/docs/cpp/launch-json-reference
// Launch configuration to debug OS161. Remember to build first with CTRL + SHIFT + B.
{
"name": "Run OS161 (Debug)",
"type": "cppdbg",
"request": "launch",
"cwd": "${env:WORKSPACE_DIR}/os161/root",
"program": "kernel",
"preLaunchTask": "Wait for Debugger Connection",
// Break at the entry point (in start.S)
"stopAtEntry": true,
"stopAtConnect": true,
// GDB Configurations
"MIMode": "gdb",
"miDebuggerPath": "${env:OS161_DEPENDENCIES_DIR}/tools/os161/bin/os161-gdb",
"miDebuggerServerAddress": "unix:.sockets/gdb",
// Run GDB commands on startup
"setupCommands": []
},
]
},
// Task definitions
"tasks": {
"version": "2.0.0",
// See documentation: https://code.visualstudio.com/Docs/editor/tasks
// https://code.visualstudio.com/docs/editor/tasks-appendix
"tasks": [
// RUN AND DEBUG TASKS
{
"label": "Run Kernel",
"detail": "Run the OS161 kernel",
"type": "shell",
"command": "sys161 kernel",
"isBackground": true,
"options": {
"cwd": "${env:WORKSPACE_DIR}/os161/root"
},
// Problem matcher required to let this task run in the background
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
},
// This task is not meant to be ran by itself, but rather as a pre-launch task for the
// debugger launch configuration
{
"label": "Wait for Debugger Connection",
"detail": "Start the kernel and wait for a debugger connection",
"isBackground": true,
"type": "shell",
"command": "sys161 -w kernel",
"options": {
"cwd": "${env:WORKSPACE_DIR}/os161/root"
},
// Problem matcher required to let this prelaunch task run in the background
// so the debugging launch configuration can run without hanging
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
},
// BUILDING TASKS
{
"label": "Build",
"detail": "Does a full build of OS161. Mapped to CTRL + SHIFT + B.",
"type": "shell",
"command": "bear -- bash scripts/build.sh -p ${env:WORKSPACE_DIR}/os161/root -k ${input:kernel}",
"problemMatcher": [],
"group": "build"
},
{
"label": "Clean Build",
"detail": "Restore the source tree to a pristine state and remove all generated files",
"type": "shell",
"command": "bash scripts/clean_build.sh",
"problemMatcher": []
}
],
// INPUT PARAMETERS TO TASKS
"inputs": [
{
"id": "kernel",
"type": "pickString",
"description": "Selected kernel to configure",
"options": [
"DUMBVM",
"DUMBVM-OPT",
"GENERIC",
"GENERIC-OPT",
"SYNCHPROBS"
]
}
]
}
}