launch.json 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. "FBT_QUIET": 1
  16. },
  17. "command": "fbt get_blackmagic",
  18. "description": "Get Blackmagic device",
  19. }
  20. }
  21. ],
  22. "configurations": [
  23. {
  24. "name": "Attach FW (ST-Link)",
  25. "cwd": "${workspaceFolder}",
  26. "executable": "./build/latest/firmware.elf",
  27. "request": "attach",
  28. "type": "cortex-debug",
  29. "servertype": "openocd",
  30. "device": "stlink",
  31. "svdFile": "./debug/STM32WB55_CM4.svd",
  32. // If you're debugging early in the boot process, before OS scheduler is running,
  33. // you have to comment out the following line.
  34. "rtos": "FreeRTOS",
  35. "configFiles": [
  36. "interface/stlink.cfg",
  37. "./debug/stm32wbx.cfg",
  38. ],
  39. "postAttachCommands": [
  40. // "compare-sections",
  41. "source debug/flipperapps.py",
  42. "fap-set-debug-elf-root build/latest/.extapps",
  43. // "source debug/FreeRTOS/FreeRTOS.py",
  44. // "svd_load debug/STM32WB55_CM4.svd"
  45. ]
  46. // "showDevDebugOutput": "raw",
  47. },
  48. {
  49. "name": "Attach FW (blackmagic)",
  50. "cwd": "${workspaceFolder}",
  51. "executable": "./build/latest/firmware.elf",
  52. "request": "attach",
  53. "type": "cortex-debug",
  54. "servertype": "external",
  55. "gdbTarget": "${input:BLACKMAGIC}",
  56. "svdFile": "./debug/STM32WB55_CM4.svd",
  57. "rtos": "FreeRTOS",
  58. "postAttachCommands": [
  59. "monitor swdp_scan",
  60. "attach 1",
  61. "set confirm off",
  62. "set mem inaccessible-by-default off",
  63. "source debug/flipperapps.py",
  64. "fap-set-debug-elf-root build/latest/.extapps",
  65. // "compare-sections",
  66. ]
  67. // "showDevDebugOutput": "raw",
  68. },
  69. {
  70. "name": "Attach FW (JLink)",
  71. "cwd": "${workspaceFolder}",
  72. "executable": "./build/latest/firmware.elf",
  73. "request": "attach",
  74. "type": "cortex-debug",
  75. "servertype": "jlink",
  76. "interface": "swd",
  77. "device": "STM32WB55RG",
  78. "svdFile": "./debug/STM32WB55_CM4.svd",
  79. "rtos": "FreeRTOS",
  80. "postAttachCommands": [
  81. "source debug/flipperapps.py",
  82. "fap-set-debug-elf-root build/latest/.extapps",
  83. ]
  84. // "showDevDebugOutput": "raw",
  85. },
  86. {
  87. "name": "Attach FW (DAP)",
  88. "cwd": "${workspaceFolder}",
  89. "executable": "./build/latest/firmware.elf",
  90. "request": "attach",
  91. "type": "cortex-debug",
  92. "servertype": "openocd",
  93. "device": "cmsis-dap",
  94. "svdFile": "./debug/STM32WB55_CM4.svd",
  95. "rtos": "FreeRTOS",
  96. "configFiles": [
  97. "interface/cmsis-dap.cfg",
  98. "./debug/stm32wbx.cfg",
  99. ],
  100. "postAttachCommands": [
  101. "source debug/flipperapps.py",
  102. "fap-set-debug-elf-root build/latest/.extapps",
  103. ],
  104. // "showDevDebugOutput": "raw",
  105. },
  106. {
  107. "name": "fbt debug",
  108. "type": "python",
  109. "request": "launch",
  110. "program": "./lib/scons/scripts/scons.py",
  111. "args": [
  112. "plugin_dist"
  113. ]
  114. },
  115. {
  116. "name": "python debug",
  117. "type": "python",
  118. "request": "launch",
  119. "program": "${file}",
  120. "args": []
  121. }
  122. ]
  123. }