Skip to content

Commit 8e7769c

Browse files
committed
Switch to probe-rs for debugging
Signed-off-by: paulober <[email protected]>
1 parent d43c346 commit 8e7769c

File tree

7 files changed

+62
-308
lines changed

7 files changed

+62
-308
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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ import {
9494
import State from "./state.mjs";
9595
import { cmakeToolsForcePicoKit } from "./utils/cmakeToolsUtil.mjs";
9696
import { NewRustProjectPanel } from "./webview/newRustProjectPanel.mjs";
97-
import GetRTTDecoderPathCommand from "./commands/rttDecoder.mjs";
9897
import { OPENOCD_VERSION } from "./utils/sharedConstants.mjs";
9998

10099
export async function activate(context: ExtensionContext): Promise<void> {
@@ -275,11 +274,11 @@ export async function activate(context: ExtensionContext): Promise<void> {
275274
!existsSync(join(workspaceFolder.uri.fsPath, ".vscode")) ||
276275
!(
277276
readFileSync(cmakeListsFilePath)
278-
.toString("utf-8")
279-
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX) ||
277+
.toString("utf-8")
278+
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX) ||
280279
readFileSync(cmakeListsFilePath)
281-
.toString("utf-8")
282-
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX_OLD)
280+
.toString("utf-8")
281+
.includes(CMAKE_DO_NOT_EDIT_HEADER_PREFIX_OLD)
283282
)
284283
) {
285284
Logger.warn(
@@ -872,7 +871,7 @@ export async function activate(context: ExtensionContext): Promise<void> {
872871
await configureCmakeNinja(workspaceFolder.uri);
873872

874873
const ws = workspaceFolder.uri.fsPath;
875-
const cMakeCachePath = join(ws, "build","CMakeCache.txt");
874+
const cMakeCachePath = join(ws, "build", "CMakeCache.txt");
876875
const newBuildType = cmakeGetPicoVar(cMakeCachePath, "CMAKE_BUILD_TYPE");
877876
ui.updateBuildType(newBuildType ?? "unknown");
878877

0 commit comments

Comments
 (0)