Skip to content

Commit f80c4c2

Browse files
committed
Add zephyr setup on opening of zephyr pico projects
Signed-off-by: paulober <[email protected]>
1 parent d8468bf commit f80c4c2

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/extension.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ export async function activate(context: ExtensionContext): Promise<void> {
301301
const result = await setupZephyr({
302302
extUri: context.extensionUri,
303303
cmakeMode: 4,
304-
cmakePath: latest[1].cmake,
305-
cmakeVersion: "",
304+
cmakePath: "",
305+
cmakeVersion: latest[1].cmake,
306306
});
307307
if (result === undefined) {
308308
void window.showErrorMessage(

web/zephyr/main.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,13 @@ var previousGpioState = false;
293293
// Validate + collect per-mode extras
294294
if (cmakeMode === 4) {
295295
if (!latestCmakeVersion) {
296-
296+
console.error('Latest CMake version element not found');
297+
vscode.postMessage({
298+
command: CMD_ERROR,
299+
value: 'Internal error: latest CMake version not found.'
300+
});
301+
submitted = false;
302+
return;
297303
}
298304
cmakeVersion = latestCmakeVersion.textContent.trim();
299305
} else if (cmakeMode === 2) {

0 commit comments

Comments
 (0)