搗騰很長時間了,用vscode編譯、調試stm32F4系列mcu的程序。記錄下。
launch.json @TOC
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
// PIO Unified Debugger
//
// Documentation: https://docs.platformio.org/page/plus/debugging.html
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html
{
“version”: “0.2.0”,
“configurations”: [
{
“cwd”: “{workspaceRoot}/BSP/SEGGER/K66FN2M0_emPower/Setup/Kinetis_K66_Target.js”,
“runToMain”: true,
}// ,
// {
// “type”: “platformio-debug”,
// “request”: “launch”,
// “name”: “PIO Debug”,
// “executable”: “c:/Users/hrstek/Documents/PlatformIO/Projects/stm405cubemxtest/.pio/build/genericSTM32F407VET6/firmware.elf”,
// “toolchainBinDir”: “C:/Users/hrstek/.platformio/packages/toolchain-gccarmnoneeabi/bin”,
// “svdPath”: “C:/Users/hrstek/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd”,
// “internalConsoleOptions”: “openOnSessionStart”
// }
]
}
setting.json
{
“remote.SSH.configFile”: “C:\Users\hrstek\.ssh\config”,
“remote.SSH.showLoginTerminal”: true,
“remote.SSH.defaultForwardedPorts”: [
],
“remote.SSH.path”: “C:\Program Files\OpenSSH”,
“remote.SSH.remotePlatform”: {
“Raspberry”: “linux”
},
“editor.suggestSelection”: “first”,
“vsintellicode.modify.editor.suggestSelection”: “automaticallyOverrodeDefaultValue”,
“cortex-debug.JLinkGDBServerPath”: “C:\Program Files (x86)\SEGGER\JLink_V634b”,
“cortex-debug.openocdPath”: “D:\OpenOCD-20200530-0.10.0\bin”,
“cortex-debug.armToolchainPath”: “D:\arm-none-eabi\bin”
/* "remote.SSH.remotePlatform": {
"linux"
} */
// “code-runner.runInTerminal”: true,
// “code-runner.saveAllFilesBeforeRun”: true
}