From 71bf177b5f992f4bb9793470cd70136fb60cebcd Mon Sep 17 00:00:00 2001 From: EkelmansPh <58972933+EkelmansPh@users.noreply.github.com> Date: Tue, 26 Sep 2023 16:33:26 +0200 Subject: [PATCH] fix: standalone stm32 build and debug (#193) --- .vscode/launch.json | 25 +++++++++++++++++++++---- CMakePresets.json | 7 +------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 52f814cc..be41011a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,6 +6,23 @@ "configurations": [ { "name": "stm32f767", + "cwd": "${workspaceFolder}", + "executable": "${command:cmake.launchTargetPath}", + "request": "launch", + "type": "cortex-debug", + "device": "STM32F767ZI", + "servertype": "external", + "showDevDebugOutput": "both", + "gdbTarget": "host.docker.internal:2331", + "overrideLaunchCommands": [ + "monitor reset", + "-target-download", + "monitor reset" + ], + "overrideRestartCommands": [ "monitor reset" ] + }, + { + "name": "stm32f767 without container", "cwd": "${workspaceRoot}", "request": "launch", "executable": "${command:cmake.launchTargetPath}", @@ -14,21 +31,21 @@ "device": "STM32F767ZI" }, { - "name": "stm32g431", + "name": "stm32g431 without container", "cwd": "${workspaceRoot}", "request": "launch", "executable": "${command:cmake.launchTargetPath}", "type": "cortex-debug", - "servertype": "stlink", + "servertype": "jlink", "device": "STM32G431RB" }, { - "name": "stm32g070", + "name": "stm32g070 without container", "cwd": "${workspaceRoot}", "request": "launch", "executable": "${command:cmake.launchTargetPath}", "type": "cortex-debug", - "servertype": "stlink", + "servertype": "jlink", "device": "STM32G070RB" } ] diff --git a/CMakePresets.json b/CMakePresets.json index 22def9ff..fceff097 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -1,10 +1,5 @@ { "version": 3, - "cmakeMinimumRequired": { - "major": 3, - "minor": 24, - "patch": 0 - }, "configurePresets": [ { "name": "defaults", @@ -43,11 +38,11 @@ "name": "stm32", "hidden": true, "inherits": "defaults", + "generator": "Ninja Multi-Config", "environment": { "CMAKE_TOOLCHAIN_FILE": "" }, "cacheVariables": { - "generator": "Ninja Multi-Config", "EMIL_GENERATE_PACKAGE_CONFIG": false, "TARGET_MCU_VENDOR": "st" }