Config for VS Code debugger and Black Magic Probe + Pixracer

Maybe you like VSC but you don't know how to config. I have tried many different configs and find out this work best for me. I have tested it with miniblink from libopencm3.



Configuration:

{
"version""0.2.0",
"configurations": [
{
"name""(gdb) Launch",
"type""cppdbg",
"request""launch",
"miDebuggerPath""arm-none-eabi-gdb",
"targetArchitecture""arm",
"program""${workspaceFolder}/miniblink.elf",
"args": [],
"stopAtEntry"false,
"cwd""${workspaceRoot}",
"environment": [],
"externalConsole"true,
"MIMode""gdb",
"setupCommands": [
"text" : "target extended-remote /dev/ttyACM0"},
"text" : "monitor tpwr disable"},
"text" : "monitor tpwr enable"},
"text" : "monitor connect_srst enable"},
"text" : "monitor swdp_scan"},
"text" : "attach 1"},
//{ "text" : "monitor option erase"}, //optional
//{ "text" : "monitor erase_mass"}, //optional
"text" : "file ${workspaceFolder}/miniblink.elf"},
"text" : "load"},
"text" : "break main"}
]
}
]
}

Sometimes you will maybe need to run it twice if you power it with Black Magic Probe.


Comments

Popular posts from this blog

AUTOSAR and CRC calculation

Flashing/debugging/running code at external memory in the memory-mapped mode

Debugging EK-TM4C123GXL with Visual Studio Code on Linux