From 46382e2cf75de85330907fe679cdd888949f52ca Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Wed, 9 Jun 2021 13:33:06 +0200 Subject: [PATCH] Adapt launch config to periCORE3 dev board --- .vscode/launch.json | 22 ++++++---------------- openocd.cfg | 6 ++++++ 2 files changed, 12 insertions(+), 16 deletions(-) create mode 100644 openocd.cfg diff --git a/.vscode/launch.json b/.vscode/launch.json index 308edaa..562872b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,34 +1,24 @@ { - // 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", "configurations": [ { "name": "gdb Launch Debug", "type": "cppdbg", "request": "launch", + "args": [], "program": "${workspaceFolder}/_build/firmware.elf", - "args": [ - "-d","${workspaceFolder}/Core/Src", - "-d","${workspaceFolder}/Core/Startup", - "-d","${workspaceFolder}/Core/Drivers", - ], "stopAtEntry": true, "cwd": "${workspaceRoot}", "environment": [], "externalConsole": false, "MIMode": "gdb", - "miDebuggerPath": "/usr/bin/arm-none-eabi-gdb", + "miDebuggerPath": "/usr/local/bin/arm-none-eabi-gdb", "debugServerPath": "openocd", - "debugServerArgs": "-f /usr/local/share/openocd/scripts/interface/stlink.cfg -f /usr/local/share/openocd/scripts/target/stm32g0x.cfg", + "debugServerArgs": "-f ${workspaceRoot}/openocd.cfg", "serverLaunchTimeout": 20000, "filterStderr": true, "filterStdout": false, "serverStarted": "Info : Listening on port 3333 for gdb connections", - // "sourceFileMap": { - // "/work/":"${workspaceFolder}" - // }, "sourceFileMap": { "${workspaceRoot}":"${workspaceFolder}" }, @@ -61,7 +51,7 @@ "text": "load", "ignoreFailures": false } - ] - }, + ] + } ] -} \ No newline at end of file +} diff --git a/openocd.cfg b/openocd.cfg new file mode 100644 index 0000000..000986e --- /dev/null +++ b/openocd.cfg @@ -0,0 +1,6 @@ +# openocd setup for coprocessor using jlink interface and swd + +source /usr/local/share/openocd/scripts/interface/jlink.cfg +transport select swd + +source /usr/local/share/openocd/scripts/target/stm32g0x.cfg