forked from flipperdevices/flipperzero-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vscode: initial development configuration (flipperdevices#1520)
* vscode: initial development configuration; fbt: `vscode_dist` target for deploying vscode config * vscode: fixed fbt blackmagic command Co-authored-by: あく <alleteam@gmail.com>
- Loading branch information
Showing
8 changed files
with
283 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
./c_cpp_properties.json | ||
./launch.json | ||
./settings.json | ||
./tasks.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Win32", | ||
"compilerPath": "${workspaceFolder}/toolchain/i686-windows/bin/arm-none-eabi-gcc.exe", | ||
"intelliSenseMode": "gcc-arm", | ||
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json", | ||
"configurationProvider": "ms-vscode.cpptools", | ||
"cStandard": "gnu17", | ||
"cppStandard": "c++17" | ||
}, | ||
{ | ||
"name": "Linux", | ||
"compilerPath": "${workspaceFolder}/toolchain/x86_64-linux/bin/arm-none-eabi-gcc", | ||
"intelliSenseMode": "gcc-arm", | ||
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json", | ||
"configurationProvider": "ms-vscode.cpptools", | ||
"cStandard": "gnu17", | ||
"cppStandard": "c++17" | ||
}, | ||
{ | ||
"name": "Mac", | ||
"compilerPath": "${workspaceFolder}/toolchain/x86_64-darwin/bin/arm-none-eabi-gcc", | ||
"intelliSenseMode": "gcc-arm", | ||
"compileCommands": "${workspaceFolder}/build/latest/compile_commands.json", | ||
"configurationProvider": "ms-vscode.cpptools", | ||
"cStandard": "gnu17", | ||
"cppStandard": "c++17" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
// 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": { | ||
"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", | ||
"rtos": "FreeRTOS", | ||
"configFiles": [ | ||
"interface/stlink.cfg", | ||
"./debug/stm32wbx.cfg", | ||
], | ||
"postAttachCommands": [ | ||
// "attach 1", | ||
"compare-sections", | ||
] | ||
// "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", | ||
"compare-sections", | ||
] | ||
// "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", | ||
// "showDevDebugOutput": "raw", | ||
}, | ||
{ | ||
"name": "fbt debug", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "./lib/scons/scripts/scons.py", | ||
"args": [ | ||
"sdk" | ||
] | ||
}, | ||
{ | ||
"name": "python debug", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"args": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"C_Cpp.default.cStandard": "gnu17", | ||
"C_Cpp.default.cppStandard": "c++17", | ||
"python.formatting.provider": "black", | ||
"workbench.tree.indent": 12, | ||
"cortex-debug.enableTelemetry": false, | ||
"cortex-debug.variableUseNaturalFormat": true, | ||
"cortex-debug.showRTOS": true, | ||
"cortex-debug.armToolchainPath.windows": "${workspaceFolder}/toolchain/i686-windows/bin", | ||
"cortex-debug.armToolchainPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/bin", | ||
"cortex-debug.armToolchainPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/bin", | ||
"cortex-debug.openocdPath.windows": "${workspaceFolder}/toolchain/i686-windows/openocd/bin/openocd.exe", | ||
"cortex-debug.openocdPath.linux": "${workspaceFolder}/toolchain/x86_64-linux/openocd/bin/openocd", | ||
"cortex-debug.openocdPath.osx": "${workspaceFolder}/toolchain/x86_64-darwin/openocd/bin/openocd", | ||
"editor.formatOnSave": true, | ||
"files.associations": { | ||
"*.scons": "python", | ||
"SConscript": "python", | ||
"SConstruct": "python", | ||
"*.fam": "python", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "[Release] Build", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt COMPACT=1 DEBUG=0" | ||
}, | ||
{ | ||
"label": "[Debug] Build", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt" | ||
}, | ||
{ | ||
"label": "[Release] Flash (ST-Link)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt COMPACT=1 DEBUG=0 FORCE=1 flash" | ||
}, | ||
{ | ||
"label": "[Debug] Flash (ST-Link)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt FORCE=1 flash" | ||
}, | ||
{ | ||
"label": "[Release] Flash (blackmagic)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt COMPACT=1 DEBUG=0 FORCE=1 flash_blackmagic" | ||
}, | ||
{ | ||
"label": "[Debug] Flash (blackmagic)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt FORCE=1 flash_blackmagic" | ||
}, | ||
{ | ||
"label": "[Release] Flash (JLink)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt COMPACT=1 DEBUG=0 FORCE=1 jflash" | ||
}, | ||
{ | ||
"label": "[Debug] Flash (JLink)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt FORCE=1 jflash" | ||
}, | ||
{ | ||
"label": "[Release] Build update bundle", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt update_package COMPACT=1 DEBUG=0" | ||
}, | ||
{ | ||
"label": "[Debug] Build update bundle", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt update_package" | ||
}, | ||
{ | ||
"label": "[Release] Build updater", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt updater_all COMPACT=1 DEBUG=0" | ||
}, | ||
{ | ||
"label": "[Debug] Build updater", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt updater_all" | ||
}, | ||
{ | ||
"label": "[Debug] Flash (USB, w/o resources)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt FORCE=1 flash_usb" | ||
}, | ||
{ | ||
"label": "[Release] Flash (USB, w/o resources)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt COMPACT=1 DEBUG=0 FORCE=1 flash_usb" | ||
}, | ||
{ | ||
"label": "[Debug:unit_tests] Flash (USB)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt FIRMWARE_APP_SET=unit_tests FORCE=1 flash_usb" | ||
}, | ||
{ | ||
"label": "[Release] Flash (USB, with resources)", | ||
"group": "build", | ||
"type": "shell", | ||
"command": "./fbt COMPACT=1 DEBUG=0 FORCE=1 flash_usb_full" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"ms-python.black-formatter", | ||
"ms-vscode.cpptools", | ||
"amiralizadeh9480.cpp-helper", | ||
"marus25.cortex-debug", | ||
"zxh404.vscode-proto3", | ||
"augustocdias.tasks-shell-input" | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters