Skip to content

Commit 1dbcd2c

Browse files
committed
Fixed run config and target selection
Signed-off-by: paulober <[email protected]>
1 parent 64d27cb commit 1dbcd2c

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/commands/launchTargetPath.mts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default class LaunchTargetPathCommand extends CommandWithResult<string> {
8989
chip === "rp2040"
9090
? "thumbv6m-none-eabi"
9191
: chip === "rp2350"
92-
? "thumbv8m.main-none-eabi"
92+
? "thumbv8m.main-none-eabihf"
9393
: "riscv32imac-unknown-none-elf";
9494

9595
return joinPosix(
@@ -179,10 +179,20 @@ export class LaunchTargetPathReleaseCommand extends CommandWithResult<string> {
179179
| undefined;
180180

181181
if (cargoToml?.package?.name) {
182+
const chip = rustProjectGetSelectedChip(
183+
workspace.workspaceFolders[0].uri.fsPath
184+
);
185+
const toolchain =
186+
chip === "rp2040"
187+
? "thumbv6m-none-eabi"
188+
: chip === "rp2350"
189+
? "thumbv8m.main-none-eabihf"
190+
: "riscv32imac-unknown-none-elf";
191+
182192
return joinPosix(
183193
workspace.workspaceFolders[0].uri.fsPath.replaceAll("\\", "/"),
184194
"target",
185-
"thumbv6m-none-eabi",
195+
toolchain,
186196
"release",
187197
cargoToml.package.name
188198
);

src/commands/switchBoard.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default class SwitchBoardCommand extends Command {
135135
board === "RP2040"
136136
? "thumbv6m-none-eabi"
137137
: board === "RP2350"
138-
? "thumbv8m.main-none-eabi"
138+
? "thumbv8m.main-none-eabihf"
139139
: "riscv32imac-unknown-none-elf";
140140

141141
await workspace

src/utils/projectGeneration/projectRust.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@ async function generateVSCodeConfig(projectRoot: string): Promise<boolean> {
147147
},
148148
{
149149
label: "Run Project",
150-
type: "process",
150+
type: "shell",
151151
dependsOn: "Compile Project",
152152
command: `\${command:${extensionName}.${GetPicotoolPathCommand.id}}`,
153153
args: [
154154
"load",
155155
"-x",
156-
"${command:raspberry-pi-pico.launchTargetPath}",
156+
"${command:raspberry-pi-pico.launchTargetPathRelease}",
157157
"-t",
158158
"elf",
159159
"-f",

0 commit comments

Comments
 (0)