"category": "Raspberry Pi Pico",
"enablement": "false"
},
+ {
+ "command": "raspberry-pi-pico.getChipUppercase",
+ "title": "Get Chip Uppercase",
+ "category": "Raspberry Pi Pico",
+ "enablement": "false"
+ },
{
"command": "raspberry-pi-pico.getTarget",
"title": "Get OpenOCD Target",
"servertype": "openocd",\
{f'{server_path}: "{openocd_path}",' if openocd_path else ""}
"gdbPath": "${{command:raspberry-pi-pico.getGDBPath}}",
- "device": "${{command:raspberry-pi-pico.getChip}}",
+ "device": "${{command:raspberry-pi-pico.getChipUppercase}}",
"configFiles": [
"{debugger}",
"target/${{command:raspberry-pi-pico.getTarget}}.cfg"
],
- "svdFile": "{codeSdkPath(sdkVersion)}/src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChip}}.svd",
+ "svdFile": "{codeSdkPath(sdkVersion)}/src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChipUppercase}}.svd",
"runToEntryPoint": "main",
// Fix for no_flash binaries, where monitor reset halt doesn't do what is expected
// Also works fine for flash binaries
"servertype": "external",
"gdbTarget": "localhost:3333",
"gdbPath": "${{command:raspberry-pi-pico.getGDBPath}}",
- "device": "${{command:raspberry-pi-pico.getChip}}",
- "svdFile": "{codeSdkPath(sdkVersion)}/src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChip}}.svd",
+ "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": [
"limit": 4
}},
"preLaunchTask": "Flash",
- "svdPath": "{codeSdkPath(sdkVersion)}/src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChip}}.svd"
+ "svdPath": "{codeSdkPath(sdkVersion)}/src/${{command:raspberry-pi-pico.getChip}}/hardware_regs/${{command:raspberry-pi-pico.getChipUppercase}}.svd"
}},
]
}}
}
}
+export class GetChipUppercaseCommand extends CommandWithResult<string> {
+ constructor() {
+ super("getChipUppercase");
+ }
+
+ async execute(): Promise<string> {
+ const cmd = new GetChipCommand();
+ const chip = await cmd.execute();
+
+ return chip.toUpperCase();
+ }
+}
+
export class GetTargetCommand extends CommandWithResult<string> {
constructor() {
super("getTarget");