-
Notifications
You must be signed in to change notification settings - Fork 0
NOTE (Debug)
Visual Studio Code (as a debugger UI) |
C/C++ for Visual Studio Code |
arm-none-eabi-gdb
|
pyOCD
|
USB |
The debug target (micro:bit device) |
-
Visual Studio Code (VS Code)
-
C/C++ for Visual Studio Code
- A VS Code extension for debugging with C/C++ source code
- https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
-
arm-none-eabi-gdb
- A generic debugger with MI (Machine Interface)
- Included in arm-none-eabi-gcc toolchain
-
pyOCD
- A debug server to debug an Arm Cortex-M microcontroller via CMSIS-DAP
- https://github.com/mbedmicro/pyOCD
-
.vscode/launch.json
is a configuration file used by VS Code for debugging.
-
Build the executable suitable for debugging using the following commands.
-
yotta build --debug-build
(oryt build -d
)
Note that the following file is required to suppress the compile error of
nrf51-sdk
for a debug build.source/suppress-errors.nrf51-sdk.cmake
-
-
Flash the
combined.hex
file (microbit-dal-ext-kit-example-combined.hex
) to the device. -
Launch VS Code and open the project root folder (
microbit-dal-ext-kit-example
). -
On VS Code, select
Debug
->Start Debugging (F5)
to start a debug session using.vscode/launch.json
. -
The debugger automatically stops at funciton
main()
.
For the general topics regarding debugger, see also References (Debugging Tools).
-
Configuring
launch.json
for C/C++ debugging -
The list of options available in
launch.json
-
If the debugger does not stop at function
main()
after starting the debug session, kill the following processes and try again.- arm-none-eabi-gdb
- pyocd
-
If you are in trouble with VS Code and
launch.json
, verify gdb and pyOCD behavior without VS Code.
The following note would be a good guide for you.- Debugging with pyOCD!
Notes for microbit-dal-ext-kit and example
README
Notes
References
[日本語版]
microbit-dal-ext-kit と example のためのノート
README
ノート
参照