Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/fbuild-cli/src/cli/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ pub enum Commands {
/// Override the board's default upload baud rate
#[arg(short = 'b', long = "baud", alias = "baud-rate")]
baud_rate: Option<u32>,
/// Force the LPC deployer to use lpc21isp instead of probe-rs SWD
#[arg(long = "no-probe-rs")]
no_probe_rs: bool,
/// Deploy destination: device (default) or emulator
#[arg(long = "to", value_parser = ["device", "emu", "emulator"])]
to: Option<String>,
Expand Down
2 changes: 2 additions & 0 deletions crates/fbuild-cli/src/cli/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ pub async fn run_deploy(
qemu: bool,
qemu_timeout: u32,
baud_rate: Option<u32>,
no_probe_rs: bool,
to: Option<String>,
emulator: Option<String>,
target: Option<String>,
Expand Down Expand Up @@ -195,6 +196,7 @@ pub async fn run_deploy(
monitor_expect: expect,
monitor_show_timestamp: !no_timestamp,
baud_rate,
no_probe_rs,
to,
emulator,
target,
Expand Down
3 changes: 3 additions & 0 deletions crates/fbuild-cli/src/cli/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ pub async fn async_main() {
qemu,
qemu_timeout,
baud_rate,
no_probe_rs,
to,
emulator,
target,
Expand Down Expand Up @@ -264,6 +265,7 @@ pub async fn async_main() {
qemu,
qemu_timeout,
baud_rate,
no_probe_rs,
to,
emulator,
target,
Expand Down Expand Up @@ -563,6 +565,7 @@ pub async fn async_main() {
false,
30,
None,
false,
None,
None,
None,
Expand Down
3 changes: 3 additions & 0 deletions crates/fbuild-cli/src/daemon_client/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ pub struct DeployRequest {
/// Override the board's default upload baud rate for flashing.
#[serde(skip_serializing_if = "Option::is_none")]
pub baud_rate: Option<u32>,
/// Force LPC deploys through lpc21isp instead of the probe-rs SWD fast path.
#[serde(default)]
pub no_probe_rs: bool,
/// Deploy destination: "device", "emu", or "emulator".
#[serde(skip_serializing_if = "Option::is_none")]
pub to: Option<String>,
Expand Down
1 change: 1 addition & 0 deletions crates/fbuild-cli/src/mcp/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ pub(super) async fn execute_tool(
monitor_expect: None,
monitor_show_timestamp: true,
baud_rate: None,
no_probe_rs: false,
to: None,
emulator: None,
target: None,
Expand Down
2 changes: 2 additions & 0 deletions crates/fbuild-daemon/src/handlers/operations/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ pub async fn deploy(
let deploy_port = deploy_port_str.clone();
let deploy_fw = firmware_path.clone();
let baud_override = req.baud_rate;
let no_probe_rs = req.no_probe_rs;
let deploy_board_overrides = board_overrides.clone();
// Snapshot the ctx pointer so the spawn_blocking closure can
// consult / update the daemon's in-memory trusted-hash cache
Expand Down Expand Up @@ -780,6 +781,7 @@ pub async fn deploy(
&deploy_board_overrides,
deploy_project.as_path(),
baud_override,
no_probe_rs,
),
_ => {
return Err(fbuild_core::FbuildError::DeployFailed(format!(
Expand Down
6 changes: 6 additions & 0 deletions crates/fbuild-daemon/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ pub struct DeployRequest {
pub monitor_show_timestamp: bool,
/// Override the board's default upload baud rate for flashing.
pub baud_rate: Option<u32>,
/// Force LPC deploys through lpc21isp instead of the probe-rs SWD fast path.
#[serde(default)]
pub no_probe_rs: bool,
/// Deploy destination: "device", "emu", or "emulator".
pub to: Option<String>,
/// Emulator backend when deploying to `emu`/`emulator`.
Expand Down Expand Up @@ -587,6 +590,7 @@ mod tests {
"monitor_halt_on_success": "PASS",
"monitor_expect": "ready",
"monitor_show_timestamp": false,
"no_probe_rs": true,
"request_id": "deploy-1"
}"#;
let req: DeployRequest = serde_json::from_str(json).unwrap();
Expand All @@ -601,6 +605,7 @@ mod tests {
assert_eq!(req.monitor_halt_on_success.unwrap(), "PASS");
assert_eq!(req.monitor_expect.unwrap(), "ready");
assert!(!req.monitor_show_timestamp);
assert!(req.no_probe_rs);
assert_eq!(req.request_id.unwrap(), "deploy-1");
}

Expand All @@ -624,6 +629,7 @@ mod tests {
assert!(req.monitor_show_timestamp);
assert!(req.to.is_none());
assert!(req.emulator.is_none());
assert!(!req.no_probe_rs);
assert!(!req.qemu);
assert_eq!(req.qemu_timeout, 30);
assert!(req.src_dir.is_none());
Expand Down
1 change: 1 addition & 0 deletions crates/fbuild-deploy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ espflash-native = ["dep:espflash", "dep:md-5"]
[dependencies]
fbuild-core = { path = "../fbuild-core" }
fbuild-config = { path = "../fbuild-config" }
fbuild-packages = { path = "../fbuild-packages" }
fbuild-paths = { path = "../fbuild-paths" }
fbuild-serial = { path = "../fbuild-serial" }
serialport = { workspace = true }
Expand Down
Loading
Loading