From e594124f2972f0fcf9aae7ec9e8e3550da0c812a Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Fri, 27 Sep 2024 17:14:20 +0100 Subject: [PATCH] Minor pico_project.py tidyups Use same overrideLaunchCommands with local and external OpenOCD Don't include ${CMAKE_CURRENT_LIST_DIR}/.. as it's not required - all files should be in source tree --- scripts/pico_project.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/pico_project.py b/scripts/pico_project.py index beed68e..fe9bd40 100644 --- a/scripts/pico_project.py +++ b/scripts/pico_project.py @@ -745,7 +745,6 @@ def GenerateCMake(folder, params): file.write('# Add the standard include files to the build\n') file.write(f'target_include_directories({projectName} PRIVATE\n') file.write(" ${CMAKE_CURRENT_LIST_DIR}\n") - file.write(" ${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required\n") file.write(')\n\n') # Selected libraries/features @@ -840,10 +839,11 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger, "device": "${{command:raspberry-pi-pico.getChipUppercase}}", "svdFile": "{codeSdkPath(sdkVersion)}/src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChipUppercase}}.svd", "runToEntryPoint": "main", - // Give restart the same functionality as runToEntryPoint - main - "postRestartCommands": [ - "break main", - "continue" + // Fix for no_flash binaries, where monitor reset halt doesn't do what is expected + // Also works fine for flash binaries + "overrideLaunchCommands": [ + "monitor reset init", + "load \\"${{command:raspberry-pi-pico.launchTargetPath}}\\"" ] }}, {{