2022-08-03 19:32:31 +03: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 17:42:59 +03:00
|
|
|
"useSingleResult": true,
|
|
|
|
"env": {
|
2023-05-08 14:11:23 +03:00
|
|
|
"PATH": "${workspaceFolder}${command:extension.commandvariable.envListSep}${env:PATH}"
|
2022-09-21 17:42:59 +03:00
|
|
|
},
|
2023-05-08 14:11:23 +03:00
|
|
|
"command": "fbt -s get_blackmagic",
|
|
|
|
"description": "Get Blackmagic device"
|
2022-08-03 19:32:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"configurations": [
|
|
|
|
{
|
|
|
|
"name": "Attach FW (ST-Link)",
|
|
|
|
"cwd": "${workspaceFolder}",
|
|
|
|
"executable": "./build/latest/firmware.elf",
|
|
|
|
"request": "attach",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"servertype": "openocd",
|
|
|
|
"device": "stlink",
|
2023-05-09 02:31:44 +03:00
|
|
|
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
|
2022-09-29 14:00:22 +03: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 19:32:31 +03:00
|
|
|
"rtos": "FreeRTOS",
|
|
|
|
"configFiles": [
|
|
|
|
"interface/stlink.cfg",
|
2023-05-09 02:31:44 +03:00
|
|
|
"./scripts/debug/stm32wbx.cfg",
|
2022-08-03 19:32:31 +03:00
|
|
|
],
|
|
|
|
"postAttachCommands": [
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperversion.py",
|
2023-05-09 01:31:39 +03:00
|
|
|
"fw-version",
|
2022-09-14 19:11:38 +03:00
|
|
|
// "compare-sections",
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperapps.py",
|
2022-11-07 17:54:41 +03:00
|
|
|
"fap-set-debug-elf-root build/latest/.extapps",
|
2023-05-09 02:31:44 +03:00
|
|
|
// "source scripts/debug/FreeRTOS/FreeRTOS.py",
|
2022-08-03 19:32:31 +03:00
|
|
|
]
|
|
|
|
// "showDevDebugOutput": "raw",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Attach FW (blackmagic)",
|
|
|
|
"cwd": "${workspaceFolder}",
|
|
|
|
"executable": "./build/latest/firmware.elf",
|
|
|
|
"request": "attach",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"servertype": "external",
|
|
|
|
"gdbTarget": "${input:BLACKMAGIC}",
|
2023-05-09 02:31:44 +03:00
|
|
|
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
|
2022-08-03 19:32:31 +03:00
|
|
|
"rtos": "FreeRTOS",
|
|
|
|
"postAttachCommands": [
|
|
|
|
"monitor swdp_scan",
|
|
|
|
"attach 1",
|
|
|
|
"set confirm off",
|
|
|
|
"set mem inaccessible-by-default off",
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperversion.py",
|
2023-05-09 01:31:39 +03:00
|
|
|
"fw-version",
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperapps.py",
|
2022-11-07 17:54:41 +03:00
|
|
|
"fap-set-debug-elf-root build/latest/.extapps",
|
2022-09-14 19:11:38 +03:00
|
|
|
// "compare-sections",
|
2022-08-03 19:32:31 +03: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",
|
2023-05-09 02:31:44 +03:00
|
|
|
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
|
2022-08-03 19:32:31 +03:00
|
|
|
"rtos": "FreeRTOS",
|
2022-09-14 19:11:38 +03:00
|
|
|
"postAttachCommands": [
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperversion.py",
|
2023-05-09 01:31:39 +03:00
|
|
|
"fw-version",
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperapps.py",
|
2022-11-07 17:54:41 +03:00
|
|
|
"fap-set-debug-elf-root build/latest/.extapps",
|
2022-09-14 19:11:38 +03:00
|
|
|
]
|
2022-08-03 19:32:31 +03:00
|
|
|
// "showDevDebugOutput": "raw",
|
|
|
|
},
|
2022-10-26 01:15:02 +03:00
|
|
|
{
|
|
|
|
"name": "Attach FW (DAP)",
|
|
|
|
"cwd": "${workspaceFolder}",
|
|
|
|
"executable": "./build/latest/firmware.elf",
|
|
|
|
"request": "attach",
|
|
|
|
"type": "cortex-debug",
|
|
|
|
"servertype": "openocd",
|
|
|
|
"device": "cmsis-dap",
|
2023-05-09 02:31:44 +03:00
|
|
|
"svdFile": "./scripts/debug/STM32WB55_CM4.svd",
|
2022-10-26 01:15:02 +03:00
|
|
|
"rtos": "FreeRTOS",
|
|
|
|
"configFiles": [
|
|
|
|
"interface/cmsis-dap.cfg",
|
2023-05-09 02:31:44 +03:00
|
|
|
"./scripts/debug/stm32wbx.cfg",
|
2022-10-26 01:15:02 +03:00
|
|
|
],
|
|
|
|
"postAttachCommands": [
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperversion.py",
|
2023-05-09 01:31:39 +03:00
|
|
|
"fw-version",
|
2023-05-09 02:31:44 +03:00
|
|
|
"source scripts/debug/flipperapps.py",
|
2022-11-07 17:54:41 +03:00
|
|
|
"fap-set-debug-elf-root build/latest/.extapps",
|
2022-10-26 01:15:02 +03:00
|
|
|
],
|
|
|
|
// "showDevDebugOutput": "raw",
|
|
|
|
},
|
2022-08-03 19:32:31 +03:00
|
|
|
{
|
|
|
|
"name": "python debug",
|
|
|
|
"type": "python",
|
|
|
|
"request": "launch",
|
|
|
|
"program": "${file}",
|
|
|
|
"args": []
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|