flipperzero-firmware/scripts/ufbt/project_template/.vscode/launch.json
hedger b9ccb274a7
ufbt: project & debugging updates (#2572)
* ufbt: removed warning in "channel=dev" update mode
* ufbt: removed API version warning; added get_blackmagic & get_apiversion targets
* ufbt: updater project template to include blackmagic & jlink targets
* ufbt: project template: fixes & updates
* ufbt: project template: added config update shortcut
* sdk: using fixed names for file components
2023-04-11 00:46:22 +10:00

95 lines
3.3 KiB
JSON

{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"inputs": [
{
"id": "BLACKMAGIC",
"type": "command",
"command": "shellCommand.execute",
"args": {
"description": "Get Blackmagic device",
"useSingleResult": true,
"command": "ufbt -s get_blackmagic",
}
},
],
"configurations": [
{
"name": "Attach FW (ST-Link)",
"cwd": "${workspaceFolder}",
"executable": "@UFBT_FIRMWARE_ELF@",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"device": "stlink",
"svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"configFiles": [
"interface/stlink.cfg",
"@UFBT_DEBUG_DIR@/stm32wbx.cfg"
],
"postAttachCommands": [
"source @UFBT_DEBUG_DIR@/flipperapps.py",
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
],
// "showDevDebugOutput": "raw",
},
{
"name": "Attach FW (DAP)",
"cwd": "${workspaceFolder}",
"executable": "@UFBT_FIRMWARE_ELF@",
"request": "attach",
"type": "cortex-debug",
"servertype": "openocd",
"device": "cmsis-dap",
"svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"configFiles": [
"interface/cmsis-dap.cfg",
"@UFBT_DEBUG_DIR@/stm32wbx.cfg"
],
"postAttachCommands": [
"source @UFBT_DEBUG_DIR@/flipperapps.py",
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
],
// "showDevDebugOutput": "raw",
},
{
"name": "Attach FW (blackmagic)",
"cwd": "${workspaceFolder}",
"executable": "@UFBT_FIRMWARE_ELF@",
"request": "attach",
"type": "cortex-debug",
"servertype": "external",
"gdbTarget": "${input:BLACKMAGIC}",
"svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"postAttachCommands": [
"monitor swdp_scan",
"attach 1",
"set confirm off",
"set mem inaccessible-by-default off",
"source @UFBT_DEBUG_DIR@/flipperapps.py",
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
]
// "showDevDebugOutput": "raw",
},
{
"name": "Attach FW (JLink)",
"cwd": "${workspaceFolder}",
"executable": "@UFBT_FIRMWARE_ELF@",
"request": "attach",
"type": "cortex-debug",
"servertype": "jlink",
"interface": "swd",
"device": "STM32WB55RG",
"svdFile": "@UFBT_DEBUG_DIR@/STM32WB55_CM4.svd",
"rtos": "FreeRTOS",
"postAttachCommands": [
"source @UFBT_DEBUG_DIR@/flipperapps.py",
"fap-set-debug-elf-root @UFBT_DEBUG_ELF_DIR@"
]
// "showDevDebugOutput": "raw",
},
]
}