Skip to content

Commit

Permalink
Fix #82 - f-string expression part cannot include a backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
will-v-pi committed Sep 13, 2024
1 parent a1de07c commit 72a02fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/pico_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger,

openocd_path = ""
server_path = "\n \"serverpath\"" # Because no \ in f-strings
extraDebugServerArgs = ' -c \\"adapter speed 5000\\"' if debugger_supports_configurable_speed else ""
openocd_path_os = Path(user_home, relativeOpenOCDPath(openOCDVersion).replace("/", "", 1), "openocd.exe")
if os.path.exists(openocd_path_os):
openocd_path = f'{codeOpenOCDPath(openOCDVersion)}/openocd.exe'
Expand Down Expand Up @@ -858,7 +859,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger,
"miDebuggerPath": "${{command:raspberry-pi-pico.getGDBPath}}",
"miDebuggerServerAddress": "localhost:3333",
"debugServerPath": "{openocd_path if openocd_path else "openocd"}",
"debugServerArgs": "-f {debugger} -f target/${{command:raspberry-pi-pico.getTarget}}.cfg{' -c \\"adapter speed 5000\\"' if debugger_supports_configurable_speed else ""}",
"debugServerArgs": "-f {debugger} -f target/${{command:raspberry-pi-pico.getTarget}}.cfg{extraDebugServerArgs}",
"serverStarted": "Listening on port .* for gdb connections",
"filterStderr": true,
"hardwareBreakpoints": {{
Expand Down

0 comments on commit 72a02fc

Please sign in to comment.