-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Cortex-Debug config, improve cppdbg
Co-authored-by: Jörg Ebeling <[email protected]>
- Loading branch information
1 parent
9b73eb7
commit 5c31695
Showing
4 changed files
with
100,066 additions
and
11 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,57 @@ | ||
// For remote debugging, you need to prepare your CM4 host with a recent OpenOCD version. | ||
// Simply follow steps 1 and 2 of this description: | ||
// https://core.x-tech.online/docs/tutorials/flashing-stm32-from-cm4/ | ||
// Once done, start OpenOCD on your CM4 host via: | ||
// openocd -f interface/xcore.cfg -f target/stm32h7x.cfg -c "bindto 0.0.0.0" | ||
// Also make sure you have the Dev Mode enabled in the bootloader. | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug on STM32", | ||
"name": "cppdbg (remote)", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"preLaunchTask": "CMake: build", | ||
"cwd": "${workspaceFolder}", | ||
"program": "${workspaceFolder}/build/Debug/openmower.elf", | ||
"program": "${command:cmake.launchTargetPath}", | ||
"postRemoteConnectCommands": [ | ||
{"text": "load"}, | ||
{ | ||
"text": "-target-download", | ||
} | ||
], | ||
"svdPath": "${workspaceFolder}/cfg/STM32H723.svd", | ||
"linux": { | ||
"MIMode": "gdb", | ||
"miDebuggerPath": "/usr/bin/gdb-multiarch", | ||
"miDebuggerServerAddress": "${input:hostname}:3333" | ||
"miDebuggerPath": "gdb-multiarch", | ||
"miDebuggerServerAddress": "${input:target}:3333", | ||
}, | ||
} | ||
}, | ||
{ | ||
"name": "Cortex-Debug (remote)", | ||
"type": "cortex-debug", | ||
"cwd": "${workspaceFolder}", | ||
"request": "launch", | ||
"servertype": "external", | ||
"gdbPath": "gdb-multiarch", | ||
"gdbTarget": "${input:target}:3333", | ||
"executable": "${command:cmake.launchTargetPath}", | ||
"svdFile": "${workspaceFolder}/cfg/STM32H723.svd", | ||
// Rebuild and flash on "Restart", but not on "Reset device". | ||
"preLaunchTask": "CMake: build", | ||
"preRestartCommands": [ | ||
"-target-download", | ||
], | ||
"preResetCommands": [], | ||
"breakAfterReset": false, | ||
// Uncomment to break in main before debugging | ||
// "runToEntryPoint": "main", | ||
}, | ||
], | ||
"inputs": [ | ||
{ | ||
"id": "hostname", | ||
"description": "Select OpenMower hostname", | ||
"id": "target", | ||
"description": "Select hostname where OpenOCD is running", | ||
"type": "promptString", | ||
} | ||
] | ||
], | ||
} |
Oops, something went wrong.