Skip to content

Commit f8d40e9

Browse files
committed
Fix zephyr integration (part 4)
Signed-off-by: paulober <[email protected]>
1 parent ae0b674 commit f8d40e9

File tree

11 files changed

+1911
-317
lines changed

11 files changed

+1911
-317
lines changed

scripts/pico_project.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,7 @@ def generateProjectFiles(
11591159
]
11601160
}
11611161

1162+
# TODO: use get picotool path command!
11621163
tasks = f"""{{
11631164
"version": "2.0.0",
11641165
"tasks": [

src/commands/getPaths.mts

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ import { getSupportedToolchains } from "../utils/toolchainUtil.mjs";
2828
import Logger from "../logger.mjs";
2929
import { rustProjectGetSelectedChip } from "../utils/rustUtil.mjs";
3030
import { OPENOCD_VERSION } from "../utils/sharedConstants.mjs";
31-
import { setupZephyr } from "../utils/setupZephyr.mjs";
3231

3332
export class GetPythonPathCommand extends CommandWithResult<string> {
33+
public static readonly id = "getPythonPath";
34+
3435
constructor() {
35-
super("getPythonPath");
36+
super(GetPythonPathCommand.id);
3637
}
3738

3839
async execute(): Promise<string> {
@@ -50,8 +51,10 @@ export class GetPythonPathCommand extends CommandWithResult<string> {
5051
}
5152

5253
export class GetEnvPathCommand extends CommandWithResult<string> {
54+
public static readonly id = "getEnvPath";
55+
5356
constructor() {
54-
super("getEnvPath");
57+
super(GetEnvPathCommand.id);
5558
}
5659

5760
async execute(): Promise<string> {
@@ -69,8 +72,10 @@ export class GetEnvPathCommand extends CommandWithResult<string> {
6972
}
7073

7174
export class GetGDBPathCommand extends CommandWithResult<string> {
75+
public static readonly id = "getGDBPath";
76+
7277
constructor(private readonly _extensionUri: Uri) {
73-
super("getGDBPath");
78+
super(GetGDBPathCommand.id);
7479
}
7580

7681
async execute(): Promise<string> {
@@ -160,8 +165,10 @@ export class GetGDBPathCommand extends CommandWithResult<string> {
160165
}
161166

162167
export class GetCompilerPathCommand extends CommandWithResult<string> {
168+
public static readonly id = "getCompilerPath";
169+
163170
constructor() {
164-
super("getCompilerPath");
171+
super(GetCompilerPathCommand.id);
165172
}
166173

167174
async execute(): Promise<string> {
@@ -199,8 +206,10 @@ export class GetCompilerPathCommand extends CommandWithResult<string> {
199206
}
200207

201208
export class GetCxxCompilerPathCommand extends CommandWithResult<string> {
209+
public static readonly id = "getCxxCompilerPath";
210+
202211
constructor() {
203-
super("getCxxCompilerPath");
212+
super(GetCxxCompilerPathCommand.id);
204213
}
205214

206215
async execute(): Promise<string> {
@@ -310,8 +319,10 @@ export class GetChipCommand extends CommandWithResult<string> {
310319
}
311320

312321
export class GetChipUppercaseCommand extends CommandWithResult<string> {
322+
public static readonly id = "getChipUppercase";
323+
313324
constructor() {
314-
super("getChipUppercase");
325+
super(GetChipUppercaseCommand.id);
315326
}
316327

317328
async execute(): Promise<string> {
@@ -323,8 +334,10 @@ export class GetChipUppercaseCommand extends CommandWithResult<string> {
323334
}
324335

325336
export class GetTargetCommand extends CommandWithResult<string> {
337+
public static readonly id = "getTarget";
338+
326339
constructor() {
327-
super("getTarget");
340+
super(GetTargetCommand.id);
328341
}
329342

330343
async execute(): Promise<string> {

src/logger.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export enum LoggerSource {
4545
rustUtil = "rustUtil",
4646
projectRust = "projectRust",
4747
zephyrSetup = "setupZephyr",
48+
projectZephyr = "projectZephyr",
4849
}
4950

5051
/**

src/utils/projectGeneration/projectRust.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ async function generateVSCodeConfig(projectRoot: string): Promise<boolean> {
224224
} catch (error) {
225225
Logger.error(
226226
LoggerSource.projectRust,
227-
"Failed to write extensions.json file",
227+
"Failed to write vscode configuration files:",
228228
unknownErrorToString(error)
229229
);
230230

0 commit comments

Comments
 (0)