Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f076f53
Added experimental rust support
paulober Sep 26, 2024
24d74a6
Some error catching and progress
paulober Sep 26, 2024
72a8b09
Added rustup support
paulober Sep 29, 2024
b3991f6
WIP
paulober Sep 30, 2024
dd88b14
Fixed rust support
paulober Oct 1, 2024
324aa93
Fixed run config and target selection
paulober Oct 1, 2024
4f96d23
Fixed run config and target selection
paulober Oct 1, 2024
e130ed3
Fix cargo install fails
paulober Oct 7, 2024
bd16b1f
[WIP] Defmt print support
paulober Oct 18, 2024
2234180
Fix rebase issue
paulober Dec 10, 2024
3e32679
Switch to probe-rs for debugging
paulober Mar 27, 2025
e61dd30
Fix probe-rs defmt
paulober Apr 1, 2025
c10b4d4
Fix debug tree item + error messages
paulober May 7, 2025
c38eb7e
Remove portable-msvc
paulober May 7, 2025
1703b09
Rust PR Clean-up
paulober May 7, 2025
c38297d
Update rust template
paulober Aug 8, 2025
39c2e61
Rust projects fix missing latest SDK
paulober Aug 8, 2025
63b02c8
Fix rp2350-riscv svd selection
paulober Aug 8, 2025
de81575
Rust: Update project creation note
paulober Aug 11, 2025
0df00e2
Add better error handling for failed flip-link install
paulober Aug 27, 2025
6348d10
Add restart note to rustup install notification
paulober Aug 27, 2025
38adbdc
Fix cargo pkg installed error
paulober Aug 28, 2025
929a8d2
Fix python and sdk installation for new rust projects
paulober Aug 28, 2025
8082a56
Add url to status code errors
paulober Sep 1, 2025
9d75c80
Fix build issue
paulober Sep 2, 2025
a2733c4
Add better licensing for rust projects + name validation + remove deb…
paulober Sep 2, 2025
1892acc
Fix sbom target path
paulober Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
273 changes: 141 additions & 132 deletions README.md

Large diffs are not rendered by default.

1,028 changes: 62 additions & 966 deletions package-lock.json

Large diffs are not rendered by default.

48 changes: 43 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
},
"activationEvents": [
"workspaceContains:./pico_sdk_import.cmake",
"workspaceContains:./.pico-rs",
"onWebviewPanel:newPicoProject",
"onWebviewPanel:newPicoMicroPythonProject"
],
Expand All @@ -79,20 +80,26 @@
"command": "raspberry-pi-pico.switchSDK",
"title": "Switch Pico SDK",
"category": "Raspberry Pi Pico",
"enablement": "raspberry-pi-pico.isPicoProject"
"enablement": "raspberry-pi-pico.isPicoProject && !raspberry-pi-pico.isRustProject"
},
{
"command": "raspberry-pi-pico.switchBoard",
"title": "Switch Board",
"category": "Raspberry Pi Pico",
"enablement": "raspberry-pi-pico.isPicoProject"
"enablement": "raspberry-pi-pico.isPicoProject && !raspberry-pi-pico.isRustProject"
},
{
"command": "raspberry-pi-pico.launchTargetPath",
"title": "Get path of the project executable",
"category": "Raspberry Pi Pico",
"enablement": "false"
},
{
"command": "raspberry-pi-pico.launchTargetPathRelease",
"title": "Get path of the project release executable (rust only)",
"category": "Raspberry Pi Pico",
"enablement": "false"
},
{
"command": "raspberry-pi-pico.getPythonPath",
"title": "Get python path",
Expand Down Expand Up @@ -147,6 +154,18 @@
"category": "Raspberry Pi Pico",
"enablement": "false"
},
{
"command": "raspberry-pi-pico.getOpenOCDRoot",
"title": "Get OpenOCD root",
"category": "Raspberry Pi Pico",
"enablement": "false"
},
{
"command": "raspberry-pi-pico.getSVDPath",
"title": "Get SVD Path (rust only)",
"category": "Raspberry Pi Pico",
"enablement": "false"
},
{
"command": "raspberry-pi-pico.compileProject",
"title": "Compile Pico Project",
Expand Down Expand Up @@ -185,13 +204,13 @@
"command": "raspberry-pi-pico.configureCmake",
"title": "Configure CMake",
"category": "Raspberry Pi Pico",
"enablement": "raspberry-pi-pico.isPicoProject"
"enablement": "raspberry-pi-pico.isPicoProject && !raspberry-pi-pico.isRustProject"
},
{
"command": "raspberry-pi-pico.switchBuildType",
"title": "Switch Build Type",
"category": "Raspberry Pi Pico",
"enablement": "raspberry-pi-pico.isPicoProject"
"enablement": "raspberry-pi-pico.isPicoProject && !raspberry-pi-pico.isRustProject"
},
{
"command": "raspberry-pi-pico.importProject",
Expand All @@ -217,13 +236,31 @@
"command": "raspberry-pi-pico.flashProject",
"title": "Flash Pico Project (SWD)",
"category": "Raspberry Pi Pico",
"enablement": "raspberry-pi-pico.isPicoProject"
"enablement": "raspberry-pi-pico.isPicoProject && !raspberry-pi-pico.isRustProject"
},
{
"command": "raspberry-pi-pico.cleanCmake",
"title": "Clean CMake",
"category": "Raspberry Pi Pico",
"enablement": "raspberry-pi-pico.isPicoProject && !raspberry-pi-pico.isRustProject"
},
{
"command": "raspberry-pi-pico.getRTTDecoderPath",
"title": "Get RTT Decoder module path",
"category": "Raspberry Pi Pico",
"enablement": "false"
},
{
"command": "raspberry-pi-pico.sbomTargetPathDebug",
"title": "Get path of the project debug SBOM (rust only)",
"category": "Raspberry Pi Pico",
"enablement": "false"
},
{
"command": "raspberry-pi-pico.sbomTargetPathRelease",
"title": "Get path of the project release SBOM (rust only)",
"category": "Raspberry Pi Pico",
"enablement": "false"
}
],
"configuration": {
Expand Down Expand Up @@ -331,6 +368,7 @@
"got": "^14.4.7",
"ini": "^5.0.0",
"rimraf": "^6.0.1",
"toml": "^3.0.0",
"undici": "^6.21.0",
"uuid": "^11.1.0",
"which": "^5.0.0"
Expand Down
9 changes: 8 additions & 1 deletion src/commands/compileProject.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { EventEmitter } from "events";
import { CommandWithResult } from "./command.mjs";
import Logger from "../logger.mjs";
import Settings, { SettingsKey } from "../settings.mjs";
import State from "../state.mjs";
import { cmakeToolsForcePicoKit } from "../utils/cmakeToolsUtil.mjs";

export default class CompileProjectCommand extends CommandWithResult<boolean> {
private _logger: Logger = new Logger("CompileProjectCommand");

Expand All @@ -14,13 +16,18 @@ export default class CompileProjectCommand extends CommandWithResult<boolean> {
}

async execute(): Promise<boolean> {
const isRustProject = State.getInstance().isRustProject;

// Get the task with the specified name
const task = (await tasks.fetchTasks()).find(
task => task.name === "Compile Project"
task =>
task.name ===
(isRustProject ? "Build + Generate SBOM (release)" : "Compile Project")
);

const settings = Settings.getInstance();
if (
!isRustProject &&
settings !== undefined &&
settings.getBoolean(SettingsKey.useCmakeTools)
) {
Expand Down
23 changes: 21 additions & 2 deletions src/commands/conditionalDebugging.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Command } from "./command.mjs";
import { Command, extensionName } from "./command.mjs";
import Logger from "../logger.mjs";
import { commands } from "vscode";
import { commands, window, workspace, debug } from "vscode";
import State from "../state.mjs";
import DebugLayoutCommand from "./debugLayout.mjs";

/**
* Relay command for the default buildin debug select and start command.
Expand All @@ -16,6 +18,23 @@ export default class ConditionalDebuggingCommand extends Command {
}

async execute(): Promise<void> {
const isRustProject = State.getInstance().isRustProject;

if (isRustProject) {
const wsFolder = workspace.workspaceFolders?.[0];
if (!wsFolder) {
this._logger.error("No workspace folder found.");
void window.showErrorMessage("No workspace folder found.");

return;
}

void commands.executeCommand(`${extensionName}.${DebugLayoutCommand.id}`);
void debug.startDebugging(wsFolder, "Pico Debug (probe-rs)");

return;
}

await commands.executeCommand("workbench.action.debug.selectandstart");
}
}
Loading
Loading