Skip to content

Instantly share code, notes, and snippets.

@phani92
Created April 21, 2023 14:19
Show Gist options
  • Save phani92/c4e52f5b8026bf56a74d109844b272ad to your computer and use it in GitHub Desktop.
Save phani92/c4e52f5b8026bf56a74d109844b272ad to your computer and use it in GitHub Desktop.
VS code launch.json with openocd and stlink
{
"configurations": [
{
"cwd": "${workspaceFolder}",
"executable": "<build_binary>.elf",
"name": "<Debug config name>",
"request": "launch",
"type": "cortex-debug",
"runToEntryPoint": "main",
"showDevDebugOutput": "raw",
"servertype": "openocd",
"interface": "swd",
"serverpath": "<wherever your openocd is installed>/bin/openocd",
"searchDir": [
"<wherever your openocd is installed>/openocd/scripts/",
],
"configFiles": [
"chip/st/stm32/stm32_regs.tcl",
"chip/st/stm32/stm32.tcl",
"chip/st/stm32/stm32_rcc.tcl",
"interface/<st-link-version>.cfg",
"board/<board>.cfg"
],
"gdbPath": "<path-of-arm-none-eabi->/bin/arm-none-eabi-gdb",
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment