launch.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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": "./scripts/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. "./scripts/debug/stm32wbx.cfg",
  37. ],
  38. "postAttachCommands": [
  39. "source scripts/debug/flipperversion.py",
  40. "fw-version",
  41. // "compare-sections",
  42. "source scripts/debug/flipperapps.py",
  43. "fap-set-debug-elf-root build/latest/.extapps",
  44. // "source scripts/debug/FreeRTOS/FreeRTOS.py",
  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": "./scripts/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 scripts/debug/flipperversion.py",
  64. "fw-version",
  65. "source scripts/debug/flipperapps.py",
  66. "fap-set-debug-elf-root build/latest/.extapps",
  67. // "compare-sections",
  68. ]
  69. // "showDevDebugOutput": "raw",
  70. },
  71. {
  72. "name": "Attach FW (JLink)",
  73. "cwd": "${workspaceFolder}",
  74. "executable": "./build/latest/firmware.elf",
  75. "request": "attach",
  76. "type": "cortex-debug",
  77. "servertype": "jlink",
  78. "interface": "swd",
  79. "device": "STM32WB55RG",
  80. "svdFile": "./scripts/debug/STM32WB55_CM4.svd",
  81. "rtos": "FreeRTOS",
  82. "postAttachCommands": [
  83. "source scripts/debug/flipperversion.py",
  84. "fw-version",
  85. "source scripts/debug/flipperapps.py",
  86. "fap-set-debug-elf-root build/latest/.extapps",
  87. ]
  88. // "showDevDebugOutput": "raw",
  89. },
  90. {
  91. "name": "Attach FW (DAP)",
  92. "cwd": "${workspaceFolder}",
  93. "executable": "./build/latest/firmware.elf",
  94. "request": "attach",
  95. "type": "cortex-debug",
  96. "servertype": "openocd",
  97. "device": "cmsis-dap",
  98. "svdFile": "./scripts/debug/STM32WB55_CM4.svd",
  99. "rtos": "FreeRTOS",
  100. "configFiles": [
  101. "interface/cmsis-dap.cfg",
  102. "./scripts/debug/stm32wbx.cfg",
  103. ],
  104. "postAttachCommands": [
  105. "source scripts/debug/flipperversion.py",
  106. "fw-version",
  107. "source scripts/debug/flipperapps.py",
  108. "fap-set-debug-elf-root build/latest/.extapps",
  109. ],
  110. // "showDevDebugOutput": "raw",
  111. },
  112. {
  113. "name": "python debug",
  114. "type": "python",
  115. "request": "launch",
  116. "program": "${file}",
  117. "args": []
  118. }
  119. ]
  120. }