launch.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. // "source debug/FreeRTOS/FreeRTOS.py",
  42. // "svd_load debug/STM32WB55_CM4.svd"
  43. ]
  44. // "showDevDebugOutput": "raw",
  45. },
  46. {
  47. "name": "Attach FW (blackmagic)",
  48. "cwd": "${workspaceFolder}",
  49. "executable": "./build/latest/firmware.elf",
  50. "request": "attach",
  51. "type": "cortex-debug",
  52. "servertype": "external",
  53. "gdbTarget": "${input:BLACKMAGIC}",
  54. "svdFile": "./debug/STM32WB55_CM4.svd",
  55. "rtos": "FreeRTOS",
  56. "postAttachCommands": [
  57. "monitor swdp_scan",
  58. "attach 1",
  59. "set confirm off",
  60. "set mem inaccessible-by-default off",
  61. "source debug/flipperapps.py",
  62. // "compare-sections",
  63. ]
  64. // "showDevDebugOutput": "raw",
  65. },
  66. {
  67. "name": "Attach FW (JLink)",
  68. "cwd": "${workspaceFolder}",
  69. "executable": "./build/latest/firmware.elf",
  70. "request": "attach",
  71. "type": "cortex-debug",
  72. "servertype": "jlink",
  73. "interface": "swd",
  74. "device": "STM32WB55RG",
  75. "svdFile": "./debug/STM32WB55_CM4.svd",
  76. "rtos": "FreeRTOS",
  77. "postAttachCommands": [
  78. "source debug/flipperapps.py",
  79. ]
  80. // "showDevDebugOutput": "raw",
  81. },
  82. {
  83. "name": "fbt debug",
  84. "type": "python",
  85. "request": "launch",
  86. "program": "./lib/scons/scripts/scons.py",
  87. "args": [
  88. "plugin_dist"
  89. ]
  90. },
  91. {
  92. "name": "python debug",
  93. "type": "python",
  94. "request": "launch",
  95. "program": "${file}",
  96. "args": []
  97. }
  98. ]
  99. }