@@ -1054,26 +1054,6 @@ def generateProjectFiles(
10541054 "load \\ "${{command:raspberry-pi-pico.launchTargetPath}}\\ ""
10551055 ]
10561056 }},
1057- {{
1058- "name": "Pico Debug (C++ Debugger)",
1059- "type": "cppdbg",
1060- "request": "launch",
1061- "cwd": "${{workspaceRoot}}",
1062- "program": "${{command:raspberry-pi-pico.launchTargetPath}}",
1063- "MIMode": "gdb",
1064- "miDebuggerPath": "${{command:raspberry-pi-pico.getGDBPath}}",
1065- "miDebuggerServerAddress": "localhost:3333",
1066- "debugServerPath": "{ openocd_path if openocd_path else "openocd" } ",
1067- "debugServerArgs": "-f { debugger } -f target/${{command:raspberry-pi-pico.getTarget}}.cfg -c \\ "adapter speed 5000\\ "",
1068- "serverStarted": "Listening on port .* for gdb connections",
1069- "filterStderr": true,
1070- "hardwareBreakpoints": {{
1071- "require": true,
1072- "limit": 4
1073- }},
1074- "preLaunchTask": "Flash",
1075- "svdPath": "{ codeSdkPath (sdkVersion )} /src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChipUppercase}}.svd"
1076- }},
10771057 ]
10781058}}
10791059"""
@@ -1247,6 +1227,50 @@ def generateProjectFiles(
12471227 "windows": {{
12481228 "command": "{ openocd_path .replace ("${userHome}" , "${env:USERPROFILE}" ) if openocd_path else "openocd" } ",
12491229 }}
1230+ }},
1231+ {{
1232+ "label": "Rescue Reset",
1233+ "type": "process",
1234+ "command": "{ openocd_path if openocd_path else "openocd" } ",
1235+ "args": [
1236+ "-s",
1237+ "{ codeOpenOCDPath (openOCDVersion )} /scripts",
1238+ "-f",
1239+ "{ debugger } ",
1240+ "-f",
1241+ "target/${{command:raspberry-pi-pico.getChip}}-rescue.cfg",
1242+ "-c",
1243+ "adapter speed 5000; reset halt; exit"
1244+ ],
1245+ "problemMatcher": [],
1246+ "windows": {{
1247+ "command": "{ openocd_path .replace ("${userHome}" , "${env:USERPROFILE}" ) if openocd_path else "openocd" } ",
1248+ }}
1249+ }},
1250+ {{
1251+ "label": "Risc-V Reset (RP2350)",
1252+ "type": "process",
1253+ "command": "{ openocd_path if openocd_path else "openocd" } ",
1254+ "args": [
1255+ "-s",
1256+ "{ codeOpenOCDPath (openOCDVersion )} /scripts",
1257+ "-c",
1258+ "set USE_CORE {{ rv0 rv1 cm0 cm1 }}",
1259+ "-f",
1260+ "{ debugger } ",
1261+ "-f",
1262+ "target/rp2350.cfg",
1263+ "-c",
1264+ "adapter speed 5000; init;",
1265+ "-c",
1266+ "write_memory 0x40120158 8 {{ 0x3 }}; echo [format \\ "Info : ARCHSEL 0x%02x\\ " [read_memory 0x40120158 8 1]];",
1267+ "-c",
1268+ "reset halt; targets rp2350.rv0; echo [format \\ "Info : ARCHSEL_STATUS 0x%02x\\ " [read_memory 0x4012015C 8 1]]; exit"
1269+ ],
1270+ "problemMatcher": [],
1271+ "windows": {{
1272+ "command": "{ openocd_path .replace ("${userHome}" , "${env:USERPROFILE}" ) if openocd_path else "openocd" } ",
1273+ }}
12501274 }}
12511275 ]
12521276}}
0 commit comments