launch.json 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {
  2. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  3. "version": "0.2.0",
  4. "inputs": [
  5. {
  6. "id": "BLACKMAGIC",
  7. "type": "command",
  8. "command": "shellCommand.execute",
  9. "args": {
  10. "description": "Get Blackmagic device",
  11. "useSingleResult": true,
  12. "command": "ufbt -s get_blackmagic",
  13. }
  14. },
  15. ],
  16. "configurations": [
  17. {
  18. "name": "Attach FW (ST-Link)",
  19. "cwd": "${workspaceFolder}",
  20. "executable": "@UFBT_FIRMWARE_ELF@",
  21. "request": "attach",
  22. "type": "cortex-debug",
  23. "servertype": "openocd",
  24. "device": "stlink",
  25. "svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
  26. "rtos": "FreeRTOS",
  27. "configFiles": [
  28. "interface/stlink.cfg",
  29. "@UFBT_DEBUG_DIR@/stm32wbx.cfg"
  30. ],
  31. "postAttachCommands": [
  32. "source @UFBT_DEBUG_DIR@/flipperversion.py",
  33. "fw-version",
  34. "source @UFBT_DEBUG_DIR@/flipperapps.py",
  35. "fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
  36. ],
  37. // "showDevDebugOutput": "raw",
  38. },
  39. {
  40. "name": "Attach FW (DAP)",
  41. "cwd": "${workspaceFolder}",
  42. "executable": "@UFBT_FIRMWARE_ELF@",
  43. "request": "attach",
  44. "type": "cortex-debug",
  45. "servertype": "openocd",
  46. "device": "cmsis-dap",
  47. "svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
  48. "rtos": "FreeRTOS",
  49. "configFiles": [
  50. "interface/cmsis-dap.cfg",
  51. "@UFBT_DEBUG_DIR@/stm32wbx.cfg"
  52. ],
  53. "postAttachCommands": [
  54. "source @UFBT_DEBUG_DIR@/flipperversion.py",
  55. "fw-version",
  56. "source @UFBT_DEBUG_DIR@/flipperapps.py",
  57. "fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
  58. ],
  59. // "showDevDebugOutput": "raw",
  60. },
  61. {
  62. "name": "Attach FW (blackmagic)",
  63. "cwd": "${workspaceFolder}",
  64. "executable": "@UFBT_FIRMWARE_ELF@",
  65. "request": "attach",
  66. "type": "cortex-debug",
  67. "servertype": "external",
  68. "gdbTarget": "${input:BLACKMAGIC}",
  69. "svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
  70. "rtos": "FreeRTOS",
  71. "postAttachCommands": [
  72. "monitor swdp_scan",
  73. "attach 1",
  74. "set confirm off",
  75. "set mem inaccessible-by-default off",
  76. "source @UFBT_DEBUG_DIR@/flipperversion.py",
  77. "fw-version",
  78. "source @UFBT_DEBUG_DIR@/flipperapps.py",
  79. "fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
  80. ]
  81. // "showDevDebugOutput": "raw",
  82. },
  83. {
  84. "name": "Attach FW (JLink)",
  85. "cwd": "${workspaceFolder}",
  86. "executable": "@UFBT_FIRMWARE_ELF@",
  87. "request": "attach",
  88. "type": "cortex-debug",
  89. "servertype": "jlink",
  90. "interface": "swd",
  91. "device": "STM32WB55RG",
  92. "svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
  93. "rtos": "FreeRTOS",
  94. "postAttachCommands": [
  95. "source @UFBT_DEBUG_DIR@/flipperversion.py",
  96. "fw-version",
  97. "source @UFBT_DEBUG_DIR@/flipperapps.py",
  98. "fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
  99. ]
  100. // "showDevDebugOutput": "raw",
  101. },
  102. ]
  103. }