launch.json 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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}${command:extension.commandvariable.envListSep}${env:PATH}"
  15. },
  16. "command": "fbt -s 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. "source debug/flipperversion.py",
  40. "fw-version",
  41. // "compare-sections",
  42. "source debug/flipperapps.py",
  43. "fap-set-debug-elf-root build/latest/.extapps",
  44. // "source debug/FreeRTOS/FreeRTOS.py",
  45. // "svd_load debug/STM32WB55_CM4.svd"
  46. ]
  47. // "showDevDebugOutput": "raw",
  48. },
  49. {
  50. "name": "Attach FW (blackmagic)",
  51. "cwd": "${workspaceFolder}",
  52. "executable": "./build/latest/firmware.elf",
  53. "request": "attach",
  54. "type": "cortex-debug",
  55. "servertype": "external",
  56. "gdbTarget": "${input:BLACKMAGIC}",
  57. "svdFile": "./debug/STM32WB55_CM4.svd",
  58. "rtos": "FreeRTOS",
  59. "postAttachCommands": [
  60. "monitor swdp_scan",
  61. "attach 1",
  62. "set confirm off",
  63. "set mem inaccessible-by-default off",
  64. "source debug/flipperversion.py",
  65. "fw-version",
  66. "source debug/flipperapps.py",
  67. "fap-set-debug-elf-root build/latest/.extapps",
  68. // "compare-sections",
  69. ]
  70. // "showDevDebugOutput": "raw",
  71. },
  72. {
  73. "name": "Attach FW (JLink)",
  74. "cwd": "${workspaceFolder}",
  75. "executable": "./build/latest/firmware.elf",
  76. "request": "attach",
  77. "type": "cortex-debug",
  78. "servertype": "jlink",
  79. "interface": "swd",
  80. "device": "STM32WB55RG",
  81. "svdFile": "./debug/STM32WB55_CM4.svd",
  82. "rtos": "FreeRTOS",
  83. "postAttachCommands": [
  84. "source debug/flipperversion.py",
  85. "fw-version",
  86. "source debug/flipperapps.py",
  87. "fap-set-debug-elf-root build/latest/.extapps",
  88. ]
  89. // "showDevDebugOutput": "raw",
  90. },
  91. {
  92. "name": "Attach FW (DAP)",
  93. "cwd": "${workspaceFolder}",
  94. "executable": "./build/latest/firmware.elf",
  95. "request": "attach",
  96. "type": "cortex-debug",
  97. "servertype": "openocd",
  98. "device": "cmsis-dap",
  99. "svdFile": "./debug/STM32WB55_CM4.svd",
  100. "rtos": "FreeRTOS",
  101. "configFiles": [
  102. "interface/cmsis-dap.cfg",
  103. "./debug/stm32wbx.cfg",
  104. ],
  105. "postAttachCommands": [
  106. "source debug/flipperversion.py",
  107. "fw-version",
  108. "source debug/flipperapps.py",
  109. "fap-set-debug-elf-root build/latest/.extapps",
  110. ],
  111. // "showDevDebugOutput": "raw",
  112. },
  113. {
  114. "name": "python debug",
  115. "type": "python",
  116. "request": "launch",
  117. "program": "${file}",
  118. "args": []
  119. }
  120. ]
  121. }