From 60b9d5c704426cf19a2525491b1a7ba04ec35646 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Arcos Date: Fri, 28 Jun 2024 15:42:30 +0200 Subject: [PATCH] fix: Update probe-rs arguments for run-elfs subcommand (#1734) --- xtask/src/main.rs | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 720d9b37c6e..806af762fc0 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -585,12 +585,30 @@ fn run_elfs(args: RunElfArgs) -> Result<()> { log::info!("Running test '{}' for '{}'", elf_name, args.chip); - let command = Command::new("probe-rs") - .arg("run") - .arg("--chip") - .arg(args.chip.to_string()) - .arg(elf_path) - .output()?; + let command = if args.chip == Chip::Esp32 { + Command::new("probe-rs") + .arg("run") + .arg("--chip") + .arg("esp32-3.3v") + .arg(elf_path) + .output()? + } else if args.chip == Chip::Esp32c2 { + Command::new("probe-rs") + .arg("run") + .arg("--chip") + .arg(args.chip.to_string()) + .arg("--speed") + .arg("15000") + .arg(elf_path) + .output()? + } else { + Command::new("probe-rs") + .arg("run") + .arg("--chip") + .arg(args.chip.to_string()) + .arg(elf_path) + .output()? + }; println!( "{}\n{}",