launch.json 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {
  2. // Use IntelliSense to learn about possible attributes.
  3. // Hover to view descriptions of existing attributes.
  4. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  5. "version": "0.2.0",
  6. "inputs": [
  7. {
  8. "id": "BLACKMAGIC",
  9. "type": "command",
  10. "command": "shellCommand.execute",
  11. "args": {
  12. "useSingleResult": true,
  13. "env": {
  14. "PATH": "${workspaceFolder};${env:PATH}"
  15. },
  16. "command": "./fbt get_blackmagic",
  17. "description": "Get Blackmagic device",
  18. }
  19. }
  20. ],
  21. "configurations": [
  22. {
  23. "name": "Attach FW (ST-Link)",
  24. "cwd": "${workspaceFolder}",
  25. "executable": "./build/latest/firmware.elf",
  26. "request": "attach",
  27. "type": "cortex-debug",
  28. "servertype": "openocd",
  29. "device": "stlink",
  30. "svdFile": "./debug/STM32WB55_CM4.svd",
  31. "rtos": "FreeRTOS",
  32. "configFiles": [
  33. "interface/stlink.cfg",
  34. "./debug/stm32wbx.cfg",
  35. ],
  36. "postAttachCommands": [
  37. // "attach 1",
  38. // "compare-sections",
  39. "source debug/flipperapps.py",
  40. // "source debug/FreeRTOS/FreeRTOS.py",
  41. // "svd_load debug/STM32WB55_CM4.svd"
  42. ]
  43. // "showDevDebugOutput": "raw",
  44. },
  45. {
  46. "name": "Attach FW (blackmagic)",
  47. "cwd": "${workspaceFolder}",
  48. "executable": "./build/latest/firmware.elf",
  49. "request": "attach",
  50. "type": "cortex-debug",
  51. "servertype": "external",
  52. "gdbTarget": "${input:BLACKMAGIC}",
  53. "svdFile": "./debug/STM32WB55_CM4.svd",
  54. "rtos": "FreeRTOS",
  55. "postAttachCommands": [
  56. "monitor swdp_scan",
  57. "attach 1",
  58. "set confirm off",
  59. "set mem inaccessible-by-default off",
  60. "source debug/flipperapps.py",
  61. // "compare-sections",
  62. ]
  63. // "showDevDebugOutput": "raw",
  64. },
  65. {
  66. "name": "Attach FW (JLink)",
  67. "cwd": "${workspaceFolder}",
  68. "executable": "./build/latest/firmware.elf",
  69. "request": "attach",
  70. "type": "cortex-debug",
  71. "servertype": "jlink",
  72. "interface": "swd",
  73. "device": "STM32WB55RG",
  74. "svdFile": "./debug/STM32WB55_CM4.svd",
  75. "rtos": "FreeRTOS",
  76. "postAttachCommands": [
  77. "source debug/flipperapps.py",
  78. ]
  79. // "showDevDebugOutput": "raw",
  80. },
  81. {
  82. "name": "fbt debug",
  83. "type": "python",
  84. "request": "launch",
  85. "program": "./lib/scons/scripts/scons.py",
  86. "args": [
  87. "plugin_dist"
  88. ]
  89. },
  90. {
  91. "name": "python debug",
  92. "type": "python",
  93. "request": "launch",
  94. "program": "${file}",
  95. "args": []
  96. }
  97. ]
  98. }