Add launch.json
Add launch.json. Add how to debug on Visual Studio Code on README.md
This commit is contained in:
parent
7368ba2747
commit
42d6daa796
3 changed files with 54 additions and 0 deletions
43
.vscode/launch.json
vendored
Normal file
43
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Microbit Debug",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceRoot}\\build\\bbc-microbit-classic-gcc\\source\\microbit-samples-combined.hex",
|
||||
"args": [],
|
||||
"stopAtEntry": true,
|
||||
"cwd": "${workspaceRoot}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"debugServerArgs": "--persist -t nrf51 -bh -r",
|
||||
"serverLaunchTimeout": 20000,
|
||||
"filterStderr": true,
|
||||
"filterStdout": false,
|
||||
"serverStarted": "GDB\\ server\\ started",
|
||||
"logging": {
|
||||
"moduleLoad": false,
|
||||
"trace": true,
|
||||
"engineLogging": true,
|
||||
"programOutput": true,
|
||||
"exceptions": false
|
||||
},
|
||||
"windows": {
|
||||
"MIMode": "gdb",
|
||||
"MIDebuggerPath": "C:\\Program Files (x86)\\GNU Tools Arm Embedded\\4.9 2015q2\\bin\\arm-none-eabi-gdb.exe",
|
||||
"debugServerPath": "C:\\yotta\\workspace\\Scripts\\pyocd-gdbserver.exe",
|
||||
"debugServerArgs": "--persist -t nrf51 -bh -r",
|
||||
"setupCommands": [
|
||||
{ "text": "-environment-cd ${workspaceRoot}\\build\\bbc-microbit-classic-gcc\\source" },
|
||||
{ "text": "-target-select remote localhost:3333", "description": "connect to target", "ignoreFailures": false },
|
||||
{ "text": "-interpreter-exec console \"monitor reset\"", "ignoreFailures": false },
|
||||
{ "text": "-interpreter-exec console \"monitor halt\"", "ignoreFailures": false },
|
||||
{ "text": "-interpreter-exec console \"monitor soft_reset_halt\"", "ignoreFailures": false },
|
||||
{ "text": "-file-exec-file ./microbit-samples-combined.hex", "description": "load file", "ignoreFailures": false},
|
||||
{ "text": "-file-symbol-file ./microbit-samples", "description": "load synbol file", "ignoreFailures": false},
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
11
README.md
11
README.md
|
@ -96,6 +96,17 @@ Here is an example of `config.json` with all available options configured:
|
|||
}
|
||||
}
|
||||
```
|
||||
## Debug on Visual Studio Code (Windows)
|
||||
|
||||
1. build sample. You can build "HELLO WORLD! :)" program.
|
||||
2. Copy microbit-samples\build\bbc-microbit-classic-gcc\source\microbit-samples-combined.hex to micro:bit.
|
||||
3. Launch the Visual Studio Code
|
||||
4. File -> Open Folder... and select "microbit-samples" folder.
|
||||
5. Set break point to "main()" function.
|
||||
6. View -> Debug (Ctrl + Shift + D)
|
||||
7. Debug -> Start Debugging (F5)
|
||||
|
||||
![Debug on Visual Studio Code](/debugOnVisualStudioCode.gif)
|
||||
|
||||
## BBC Community Guidelines
|
||||
|
||||
|
|
BIN
debugOnVisualStudioCode.gif
Normal file
BIN
debugOnVisualStudioCode.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Loading…
Reference in a new issue