Skip to content

Commit 2f38a04

Browse files
committed
Switch to probe-rs for debugging
Signed-off-by: paulober <[email protected]>
1 parent 49558a1 commit 2f38a04

File tree

7 files changed

+62
-309
lines changed

7 files changed

+62
-309
lines changed

scripts/rttDecoder.cjs

Lines changed: 0 additions & 98 deletions
This file was deleted.

scripts/rttDecoder.mjs

Lines changed: 0 additions & 121 deletions
This file was deleted.

src/commands/getPaths.mts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ export class GetCxxCompilerPathCommand extends CommandWithResult<string> {
227227
}
228228

229229
return join(
230-
buildToolchainPath(toolchainVersion), "bin",
230+
buildToolchainPath(toolchainVersion),
231+
"bin",
231232
triple + `-g++${process.platform === "win32" ? ".exe" : ""}`
232233
);
233234
}
@@ -236,8 +237,10 @@ export class GetCxxCompilerPathCommand extends CommandWithResult<string> {
236237
export class GetChipCommand extends CommandWithResult<string> {
237238
private readonly _logger = new Logger("GetChipCommand");
238239

240+
public static readonly id = "getChip";
241+
239242
constructor() {
240-
super("getChip");
243+
super(GetChipCommand.id);
241244
}
242245

243246
async execute(): Promise<string> {
@@ -260,7 +263,15 @@ export class GetChipCommand extends CommandWithResult<string> {
260263
return "";
261264
}
262265

263-
return chip;
266+
switch (chip) {
267+
case "rp2040":
268+
return "rp2040";
269+
case "rp2350":
270+
case "rp2350-riscv":
271+
return "rp235x";
272+
default:
273+
return "rp2040";
274+
}
264275
}
265276

266277
const settings = Settings.getInstance();

src/commands/rttDecoder.mts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/extension.mts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ import {
9292
} from "./utils/rustUtil.mjs";
9393
import State from "./state.mjs";
9494
import { NewRustProjectPanel } from "./webview/newRustProjectPanel.mjs";
95-
import GetRTTDecoderPathCommand from "./commands/rttDecoder.mjs";
9695
import { OPENOCD_VERSION } from "./utils/sharedConstants.mjs";
9796

9897
export async function activate(context: ExtensionContext): Promise<void> {
@@ -145,7 +144,6 @@ export async function activate(context: ExtensionContext): Promise<void> {
145144
new NewExampleProjectCommand(context.extensionUri),
146145
new UninstallPicoSDKCommand(),
147146
new CleanCMakeCommand(ui),
148-
new GetRTTDecoderPathCommand(context.extensionUri),
149147
];
150148

151149
// register all command handlers
@@ -272,11 +270,11 @@ export async function activate(context: ExtensionContext): Promise<void> {
272270
!existsSync(join(workspaceFolder.uri.fsPath, ".vscode")) ||
273271
!(
274272
readFileSync(cmakeListsFilePath)
275-
.toString("utf-8")
276-
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX) ||
273+
.toString("utf-8")
274+
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX) ||
277275
readFileSync(cmakeListsFilePath)
278-
.toString("utf-8")
279-
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX_OLD)
276+
.toString("utf-8")
277+
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX_OLD)
280278
)
281279
) {
282280
Logger.warn(
@@ -869,7 +867,7 @@ export async function activate(context: ExtensionContext): Promise<void> {
869867
await configureCmakeNinja(workspaceFolder.uri);
870868

871869
const ws = workspaceFolder.uri.fsPath;
872-
const cMakeCachePath = join(ws, "build","CMakeCache.txt");
870+
const cMakeCachePath = join(ws, "build", "CMakeCache.txt");
873871
const newBuildType = cmakeGetPicoVar(cMakeCachePath, "CMAKE_BUILD_TYPE");
874872
ui.updateBuildType(newBuildType ?? "unknown");
875873

0 commit comments

Comments
 (0)