Skip to content

Commit

Permalink
Add VSCode launch file to be able to debug MicroPython builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed May 17, 2024
1 parent 0c932d2 commit d64efa2
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"configurations": [
{
"name": "micro:bit PyOCD Cortex Debug",
"cwd": "${workspaceFolder}",
"executable": "micropython-microbit-v2/lib/codal/build/MICROBIT",
"request": "launch",
"type": "cortex-debug",
"servertype": "pyocd",
"interface": "swd",
"device": "nrf52",
"targetId": "nrf52",
"svdFile": "micropython-microbit-v2/lib/codal/libraries/codal-nrf52/nrfx/mdk/nrf52833.svd",
"preLaunchCommands": [
"load micropython-microbit-v2/lib/codal/build/MICROBIT",
"enable breakpoint",
"monitor reset"
]
},
{
"name": "micro:bit OpenOCD Cortex Debug",
"cwd": "${workspaceFolder}",
"executable": "micropython-microbit-v2/lib/codal/build/MICROBIT",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"configFiles": [
"interface/cmsis-dap.cfg",
"target/nrf52.cfg"
],
"interface": "swd",
"svdFile": "micropython-microbit-v2/lib/codal/libraries/codal-nrf52/nrfx/mdk/nrf52833.svd",
"preLaunchCommands": [
"load micropython-microbit-v2/lib/codal/build/MICROBIT",
"enable breakpoint",
"monitor reset"
],
"openOCDLaunchCommands": [
"adapter speed 8000"
]
},
{
"name": "(attach) micro:bit OpenOCD Cortex Debug",
"cwd": "${workspaceFolder}",
"executable": "micropython-microbit-v2/lib/codal/build/MICROBIT",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"configFiles": [
"interface/cmsis-dap.cfg",
"target/nrf52.cfg"
],
"interface": "swd",
"svdFile": "micropython-microbit-v2/lib/codal/libraries/codal-nrf52/nrfx/mdk/nrf52833.svd",
"preAttachCommands": [],
"openOCDLaunchCommands": [
"adapter speed 8000"
]
}
]
}

0 comments on commit d64efa2

Please sign in to comment.