diff --git a/scripts/pico_project.py b/scripts/pico_project.py index e0f2432..7143edf 100644 --- a/scripts/pico_project.py +++ b/scripts/pico_project.py @@ -1182,10 +1182,10 @@ def generateProjectFiles( {{ "label": "Run Project", "type": "process", - "command": "{propertiesPicotoolPath(picotoolVersion, force_non_windows=True)}/picotool/picotool", + "command": "${{command:raspberry-pi-pico.getPicotoolPath}}", "args": [ "load", - "${{command:raspberry-pi-pico.launchTargetPath}}", + "\\"${{command:raspberry-pi-pico.launchTargetPath}}\\"", "-fx" ], "presentation": {{ @@ -1194,16 +1194,16 @@ def generateProjectFiles( }}, "problemMatcher": [], "windows": {{ - "command": "{propertiesPicotoolPath(picotoolVersion, force_windows=True)}/picotool/picotool.exe" + "command": "\\\\\\\\?\\\\${{command:raspberry-pi-pico.getPicotoolPath}}" }} }}, {{ "label": "Flash", "type": "process", - "command": "{openocd_path if openocd_path else "openocd"}", + "command": "${{command:raspberry-pi-pico.getOpenOCDRoot}}/openocd.exe", "args": [ "-s", - "{codeOpenOCDPath(openOCDVersion)}/scripts", + "${{command:raspberry-pi-pico.getOpenOCDRoot}}/scripts", "-f", "{debugger}", "-f", @@ -1213,16 +1213,16 @@ def generateProjectFiles( ], "problemMatcher": [], "windows": {{ - "command": "{openocd_path.replace("${userHome}", "${env:USERPROFILE}") if openocd_path else "openocd"}", + "command": "\\\\\\\\?\\\\${{command:raspberry-pi-pico.getOpenOCDRoot}}/openocd.exe", }} }}, {{ "label": "Rescue Reset", "type": "process", - "command": "{openocd_path if openocd_path else "openocd"}", + "command": "${{command:raspberry-pi-pico.getOpenOCDRoot}}/openocd.exe", "args": [ "-s", - "{codeOpenOCDPath(openOCDVersion)}/scripts", + "${{command:raspberry-pi-pico.getOpenOCDRoot}}/scripts", "-f", "{debugger}", "-f", @@ -1232,16 +1232,16 @@ def generateProjectFiles( ], "problemMatcher": [], "windows": {{ - "command": "{openocd_path.replace("${userHome}", "${env:USERPROFILE}") if openocd_path else "openocd"}", + "command": "\\\\\\\\?\\\\${{command:raspberry-pi-pico.getOpenOCDRoot}}/openocd.exe", }} }}, {{ - "label": "Risc-V Reset (RP2350)", + "label": "RISC-V Reset (RP2350)", "type": "process", - "command": "{openocd_path if openocd_path else "openocd"}", + "command": "${{command:raspberry-pi-pico.getOpenOCDRoot}}/openocd.exe", "args": [ "-s", - "{codeOpenOCDPath(openOCDVersion)}/scripts", + "${{command:raspberry-pi-pico.getOpenOCDRoot}}/scripts", "-c", "set USE_CORE {{ rv0 rv1 cm0 cm1 }}", "-f", @@ -1257,7 +1257,7 @@ def generateProjectFiles( ], "problemMatcher": [], "windows": {{ - "command": "{openocd_path.replace("${userHome}", "${env:USERPROFILE}") if openocd_path else "openocd"}", + "command": "\\\\\\\\?\\\\${{command:raspberry-pi-pico.getOpenOCDRoot}}/openocd.exe", }} }} ] diff --git a/src/commands/getPaths.mts b/src/commands/getPaths.mts index f7b5d36..5f840c3 100644 --- a/src/commands/getPaths.mts +++ b/src/commands/getPaths.mts @@ -497,7 +497,7 @@ export class GetPicotoolPathCommand extends CommandWithResult< // TODO: maybe move "picotool" into buildPath or install it so the files // are in root of buildPath - return join( + return joinPosix( buildPicotoolPath(picotoolVersion), "picotool", process.platform === "win32" ? "picotool.exe" : "picotool"