Skip to content

Commit

Permalink
Update probe-rs version (esp-rs#1914)
Browse files Browse the repository at this point in the history
* docs: Update probe-rs version

* feat: Simplify probe-rs args

* ci: Update the checkout action to use the fork
  • Loading branch information
SergioGasquez authored Aug 9, 2024
1 parent cb0016a commit 2e8937a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 31 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ jobs:
usb: USB0
steps:
- uses: actions/checkout@v4
if: github.event_name != 'workflow_dispatch'
- uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch'
with:
repository: ${{ github.event.inputs.repository }}
ref: ${{ github.event.inputs.branch }}

- uses: actions/download-artifact@v4
with:
name: tests-${{ matrix.target.soc }}
Expand Down
4 changes: 2 additions & 2 deletions hil-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ We use [probe-rs] for flashing and running the tests on a target device, however
```text
cargo install probe-rs-tools \
--git https://github.com/probe-rs/probe-rs \
--rev a6dd038 --force --locked
--rev bba1bb5 --force --locked
```

Target device **MUST** connected via its USB-Serial-JTAG port, or if unavailable (eg. ESP32, ESP32-C2, ESP32-S2) then you must connect a compatible debug probe such as an [ESP-Prog].
Expand Down Expand Up @@ -108,7 +108,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-t
# Install dependencies
sudo apt install -y pkg-config libudev-dev
# Install probe-rs
cargo install probe-rs-tools --git https://github.com/probe-rs/probe-rs --rev a6dd038 --force
cargo install probe-rs-tools --git https://github.com/probe-rs/probe-rs --rev bba1bb5 --force
# Add the udev rules
wget -O - https://probe.rs/files/69-probe-rs.rules | sudo tee /etc/udev/rules.d/69-probe-rs.rules > /dev/null
# Add the user to plugdev group
Expand Down
15 changes: 2 additions & 13 deletions xtask/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,8 @@ pub fn execute_app(

// probe-rs cannot currently do auto detection, so we need to tell probe-rs run
// which chip we are testing
if subcommand == "test" {
if chip == Chip::Esp32 {
builder = builder.arg("--").arg("--chip").arg("esp32-3.3v");
} else if chip == Chip::Esp32c2 {
builder = builder
.arg("--")
.arg("--chip")
.arg("esp32c2")
.arg("--speed")
.arg("15000");
} else {
builder = builder.arg("--").arg("--chip").arg(format!("{}", chip));
}
if subcommand == "test" && chip == Chip::Esp32c2 {
builder = builder.arg("--").arg("--speed").arg("15000");
}

// If targeting an Xtensa device, we must use the '+esp' toolchain modifier:
Expand Down
18 changes: 2 additions & 16 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,29 +676,15 @@ fn run_elfs(args: RunElfArgs) -> Result<()> {

log::info!("Running test '{}' for '{}'", elf_name, args.chip);

let command = if args.chip == Chip::Esp32 {
let command = if args.chip == Chip::Esp32c2 {
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()?
Command::new("probe-rs").arg("run").arg(elf_path).output()?
};

println!(
Expand Down

0 comments on commit 2e8937a

Please sign in to comment.