launch.json 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * Remote debugging on STM32 using the "Cortex Debug" extension.
  3. *
  4. * Copy one or more of the configurations items below into .vscode/launch.json
  5. * to add those debug options to the PlatformIO IDE "Run & Debug" panel.
  6. *
  7. * Examples for BigTreeTech SKR 2 (USB) and Native Simulator. Modify for your own build.
  8. *
  9. * NOTE: The PlatformIO extension will remove items when regenerating launch.json.
  10. */
  11. {
  12. "version": "0.2.0",
  13. "configurations": [
  14. {
  15. "name": "Debug STM32 (ST-Link)",
  16. "request": "launch",
  17. "type": "cortex-debug",
  18. "servertype": "openocd",
  19. "cwd": "${workspaceRoot}",
  20. "showDevDebugOutput": false,
  21. "configFiles": [ "interface/stlink.cfg", "target/stm32f4x.cfg" ],
  22. "device": "stlink",
  23. "executable": "${workspaceRoot}/.pio/build/STM32F407VG_btt_USB_debug/firmware.elf",
  24. "openOCDLaunchCommands": [ "init", "reset init" ],
  25. "svdFile": "${env:HOME}/.platformio/platforms/ststm32@12.1.1/misc/svd/STM32F40x.svd",
  26. },
  27. {
  28. "name": "Launch Sim (ggdb)",
  29. "request": "launch",
  30. "type": "cppdbg",
  31. "cwd": "${workspaceRoot}",
  32. "program": "${workspaceRoot}/.pio/build/simulator_macos_debug/debug/MarlinSimulator",
  33. //"program": "${workspaceRoot}/.pio/build/simulator_linux_debug/MarlinSimulator",
  34. //"program": "${workspaceRoot}/.pio/build/simulator_windows/MarlinSimulator",
  35. "miDebuggerPath": "/opt/local/bin/ggdb",
  36. "MIMode": "gdb"
  37. },
  38. {
  39. "name": "Launch Sim (lldb)",
  40. "request": "launch",
  41. "type": "cppdbg",
  42. "cwd": "${workspaceRoot}",
  43. "program": "${workspaceRoot}/.pio/build/simulator_macos_debug/debug/MarlinSimulator",
  44. //"program": "${workspaceRoot}/.pio/build/simulator_linux_debug/MarlinSimulator",
  45. //"program": "${workspaceRoot}/.pio/build/simulator_windows/MarlinSimulator",
  46. //"targetArchitecture": "arm64",
  47. "MIMode": "lldb"
  48. },
  49. {
  50. "name": "Launch Sim (Windows gdb)",
  51. "request": "launch",
  52. "type": "cppdbg",
  53. "cwd": "${workspaceRoot}",
  54. "program": "${workspaceRoot}/.pio/build/simulator_windows/debug/MarlinSimulator.exe",
  55. "MIMode": "gdb",
  56. "miDebuggerPath": "C:/msys64/mingw64/bin/gdb.exe"
  57. }
  58. ]
  59. }