launch.json 4.2 KB

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