2022-08-03 16:32:31 +00:00
|
|
|
{
|
|
|
|
// Use IntelliSense to learn about possible attributes.
|
|
|
|
// Hover to view descriptions of existing attributes.
|
|
|
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
|
|
"version": "0.2.0",
|
|
|
|
"inputs": [
|
|
|
|
{
|
|
|
|
"id": "BLACKMAGIC",
|
|
|
|
"type": "command",
|
|
|
|
"command": "shellCommand.execute",
|
|
|
|
"args": {
|
2022-09-21 14:42:59 +00:00
|
|
|
"useSingleResult": true,
|
|
|
|
"env": {
|
|
|
|
"PATH": "${workspaceFolder};${env:PATH}"
|
|
|
|
},
|
2022-08-03 16:32:31 +00:00
|
|
|
"command": "./fbt get_blackmagic",
|
|
|
|
"description": "Get Blackmagic device",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"configurations": [
|
|
|
|
{
|
|
|
|
"name": "Attach FW (ST-Link)",
|
|
|
|
"cwd": "${workspaceFolder}",
|
|
|
|
"executable": "./build/latest/firmware.elf",
|
|
|
|
"request": "attach",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"servertype": "openocd",
|
|
|
|
"device": "stlink",
|
|
|
|
"svdFile": "./debug/STM32WB55_CM4.svd",
|
2022-09-29 11:00:22 +00:00
|
|
|
// If you're debugging early in the boot process, before OS scheduler is running,
|
|
|
|
// you have to comment out the following line.
|
2022-08-03 16:32:31 +00:00
|
|
|
"rtos": "FreeRTOS",
|
|
|
|
"configFiles": [
|
|
|
|
"interface/stlink.cfg",
|
|
|
|
"./debug/stm32wbx.cfg",
|
|
|
|
],
|
|
|
|
"postAttachCommands": [
|
2022-09-14 16:11:38 +00:00
|
|
|
// "compare-sections",
|
|
|
|
"source debug/flipperapps.py",
|
|
|
|
// "source debug/FreeRTOS/FreeRTOS.py",
|
|
|
|
// "svd_load debug/STM32WB55_CM4.svd"
|
2022-08-03 16:32:31 +00:00
|
|
|
]
|
|
|
|
// "showDevDebugOutput": "raw",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Attach FW (blackmagic)",
|
|
|
|
"cwd": "${workspaceFolder}",
|
|
|
|
"executable": "./build/latest/firmware.elf",
|
|
|
|
"request": "attach",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"servertype": "external",
|
|
|
|
"gdbTarget": "${input:BLACKMAGIC}",
|
|
|
|
"svdFile": "./debug/STM32WB55_CM4.svd",
|
|
|
|
"rtos": "FreeRTOS",
|
|
|
|
"postAttachCommands": [
|
|
|
|
"monitor swdp_scan",
|
|
|
|
"attach 1",
|
|
|
|
"set confirm off",
|
|
|
|
"set mem inaccessible-by-default off",
|
2022-09-14 16:11:38 +00:00
|
|
|
"source debug/flipperapps.py",
|
|
|
|
// "compare-sections",
|
2022-08-03 16:32:31 +00:00
|
|
|
]
|
|
|
|
// "showDevDebugOutput": "raw",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Attach FW (JLink)",
|
|
|
|
"cwd": "${workspaceFolder}",
|
|
|
|
"executable": "./build/latest/firmware.elf",
|
|
|
|
"request": "attach",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"servertype": "jlink",
|
|
|
|
"interface": "swd",
|
|
|
|
"device": "STM32WB55RG",
|
|
|
|
"svdFile": "./debug/STM32WB55_CM4.svd",
|
|
|
|
"rtos": "FreeRTOS",
|
2022-09-14 16:11:38 +00:00
|
|
|
"postAttachCommands": [
|
|
|
|
"source debug/flipperapps.py",
|
|
|
|
]
|
2022-08-03 16:32:31 +00:00
|
|
|
// "showDevDebugOutput": "raw",
|
|
|
|
},
|
2022-10-25 22:15:02 +00:00
|
|
|
{
|
|
|
|
"name": "Attach FW (DAP)",
|
|
|
|
"cwd": "${workspaceFolder}",
|
|
|
|
"executable": "./build/latest/firmware.elf",
|
|
|
|
"request": "attach",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"servertype": "openocd",
|
|
|
|
"device": "cmsis-dap",
|
|
|
|
"svdFile": "./debug/STM32WB55_CM4.svd",
|
|
|
|
"rtos": "FreeRTOS",
|
|
|
|
"configFiles": [
|
|
|
|
"interface/cmsis-dap.cfg",
|
|
|
|
"./debug/stm32wbx.cfg",
|
|
|
|
],
|
|
|
|
"postAttachCommands": [
|
|
|
|
"source debug/flipperapps.py",
|
|
|
|
],
|
|
|
|
// "showDevDebugOutput": "raw",
|
|
|
|
},
|
2022-08-03 16:32:31 +00:00
|
|
|
{
|
|
|
|
"name": "fbt debug",
|
|
|
|
"type": "python",
|
|
|
|
"request": "launch",
|
|
|
|
"program": "./lib/scons/scripts/scons.py",
|
|
|
|
"args": [
|
2022-09-14 16:11:38 +00:00
|
|
|
"plugin_dist"
|
2022-08-03 16:32:31 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "python debug",
|
|
|
|
"type": "python",
|
|
|
|
"request": "launch",
|
|
|
|
"program": "${file}",
|
|
|
|
"args": []
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|