Skip to content

Commit

Permalink
Minor pico_project.py tidyups
Browse files Browse the repository at this point in the history
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
  • Loading branch information
will-v-pi committed Sep 27, 2024
1 parent 4f6dfe1 commit e594124
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/pico_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}}\\""
]
}},
{{
Expand Down

0 comments on commit e594124

Please sign in to comment.