1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-02 08:09:36 +00:00
MarlinFirmware/buildroot/share/PlatformIO/debugging/launch.json
Scott Lahteine dde89795c9
🔨 Rename "BTT" things, MCU-based SKR 2 (#27319)
Co-authored-by: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com>
2024-07-29 13:25:17 -05:00

60 lines
2.4 KiB
JSON

/**
* Remote debugging on STM32 using the "Cortex Debug" extension.
*
* Copy one or more of the configurations items below into .vscode/launch.json
* to add those debug options to the PlatformIO IDE "Run & Debug" panel.
*
* Examples for BigTreeTech SKR 2 (USB) and Native Simulator. Modify for your own build.
*
* NOTE: The PlatformIO extension will remove items when regenerating launch.json.
*/
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug STM32 (ST-Link)",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"cwd": "${workspaceRoot}",
"showDevDebugOutput": false,
"configFiles": [ "interface/stlink.cfg", "target/stm32f4x.cfg" ],
"device": "stlink",
"executable": "${workspaceRoot}/.pio/build/STM32F407VG_btt_USB_debug/firmware.elf",
"openOCDLaunchCommands": [ "init", "reset init" ],
"svdFile": "${env:HOME}/.platformio/platforms/ststm32@12.1.1/misc/svd/STM32F40x.svd",
},
{
"name": "Launch Sim (ggdb)",
"request": "launch",
"type": "cppdbg",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/.pio/build/simulator_macos_debug/debug/MarlinSimulator",
//"program": "${workspaceRoot}/.pio/build/simulator_linux_debug/MarlinSimulator",
//"program": "${workspaceRoot}/.pio/build/simulator_windows/MarlinSimulator",
"miDebuggerPath": "/opt/local/bin/ggdb",
"MIMode": "gdb"
},
{
"name": "Launch Sim (lldb)",
"request": "launch",
"type": "cppdbg",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/.pio/build/simulator_macos_debug/debug/MarlinSimulator",
//"program": "${workspaceRoot}/.pio/build/simulator_linux_debug/MarlinSimulator",
//"program": "${workspaceRoot}/.pio/build/simulator_windows/MarlinSimulator",
//"targetArchitecture": "arm64",
"MIMode": "lldb"
},
{
"name": "Launch Sim (Windows gdb)",
"request": "launch",
"type": "cppdbg",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/.pio/build/simulator_windows/debug/MarlinSimulator.exe",
"MIMode": "gdb",
"miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe"
}
]
}