Skip to content

Commit e594124

Browse files
committed
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
1 parent 4f6dfe1 commit e594124

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/pico_project.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,6 @@ def GenerateCMake(folder, params):
745745
file.write('# Add the standard include files to the build\n')
746746
file.write(f'target_include_directories({projectName} PRIVATE\n')
747747
file.write(" ${CMAKE_CURRENT_LIST_DIR}\n")
748-
file.write(" ${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts or any other standard includes, if required\n")
749748
file.write(')\n\n')
750749

751750
# Selected libraries/features
@@ -840,10 +839,11 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger,
840839
"device": "${{command:raspberry-pi-pico.getChipUppercase}}",
841840
"svdFile": "{codeSdkPath(sdkVersion)}/src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChipUppercase}}.svd",
842841
"runToEntryPoint": "main",
843-
// Give restart the same functionality as runToEntryPoint - main
844-
"postRestartCommands": [
845-
"break main",
846-
"continue"
842+
// Fix for no_flash binaries, where monitor reset halt doesn't do what is expected
843+
// Also works fine for flash binaries
844+
"overrideLaunchCommands": [
845+
"monitor reset init",
846+
"load \\"${{command:raspberry-pi-pico.launchTargetPath}}\\""
847847
]
848848
}},
849849
{{

0 commit comments

Comments
 (0)