mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-10-02 14:44:42 +00:00
Enable S3 HIL (#1338)
* feat: Add HIL support for S3 * ci: Add dummy s3 job * test: Filter interrupt test for Xtensa devices * ci: Install Xtensa toolchain
This commit is contained in:
parent
586744070b
commit
1a5ca65eed
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@ -307,21 +307,41 @@ jobs:
|
||||
- name: rustfmt (examples)
|
||||
run: cargo fmt --all --manifest-path=examples/Cargo.toml -- --check
|
||||
|
||||
riscv-hil:
|
||||
name: HIL Test | ${{ matrix.soc }}
|
||||
hil:
|
||||
name: HIL Test | ${{ matrix.target.soc }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
soc: [esp32c3, esp32c6, esp32h2]
|
||||
target:
|
||||
# RISC-V devices:
|
||||
- soc: esp32c3
|
||||
rust-target: riscv32imc-unknown-none-elf
|
||||
- soc: esp32c6
|
||||
rust-target: riscv32imac-unknown-none-elf
|
||||
- soc: esp32h2
|
||||
rust-target: riscv32imac-unknown-none-elf
|
||||
# Xtensa devices:
|
||||
- soc: esp32s3
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@v1
|
||||
# Install the Rust toolchain for RISC-V devices:
|
||||
|
||||
- if: ${{ !contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.target.soc) }}
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf,riscv32imafc-unknown-none-elf
|
||||
target: ${{ matrix.target.rust-target }}
|
||||
toolchain: nightly
|
||||
components: rust-src
|
||||
# Install the Rust toolchain for Xtensa devices:
|
||||
- if: contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.target.soc)
|
||||
uses: esp-rs/xtensa-toolchain@v1.5
|
||||
with:
|
||||
buildtargets: ${{ matrix.target.soc }}
|
||||
default: true
|
||||
ldproxy: false
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo xtask build-examples hil-test ${{ matrix.soc }}
|
||||
- run: cargo xtask build-examples hil-test ${{ matrix.target.soc }}
|
||||
|
21
.github/workflows/hil.yml
vendored
21
.github/workflows/hil.yml
vendored
@ -17,8 +17,7 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
# Test RISC-V targets:
|
||||
riscv-hil:
|
||||
hil:
|
||||
name: HIL Test | ${{ matrix.target.soc }}
|
||||
runs-on:
|
||||
labels: [self-hosted, "${{ matrix.target.runner }}"]
|
||||
@ -26,6 +25,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
# RISC-V devices:
|
||||
- soc: esp32c3
|
||||
runner: rustboard
|
||||
rust-target: riscv32imc-unknown-none-elf
|
||||
@ -35,6 +35,9 @@ jobs:
|
||||
- soc: esp32h2
|
||||
runner: esp32h2-usb
|
||||
rust-target: riscv32imac-unknown-none-elf
|
||||
# Xtensa devices:
|
||||
- soc: esp32s3
|
||||
runner: esp32s3-usb
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
@ -45,14 +48,20 @@ jobs:
|
||||
repository: ${{ github.event.inputs.repository }}
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
|
||||
- uses: dtolnay/rust-toolchain@v1
|
||||
# Install the Rust toolchain for RISC-V devices:
|
||||
- if: ${{ !contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.target.soc) }}
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
target: ${{ matrix.target.rust-target }}
|
||||
toolchain: nightly
|
||||
components: rust-src
|
||||
# Install the Rust toolchain for Xtensa devices:
|
||||
- if: contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.target.soc)
|
||||
uses: esp-rs/xtensa-toolchain@v1.5
|
||||
with:
|
||||
buildtargets: ${{ matrix.target.soc }}
|
||||
default: true
|
||||
ldproxy: false
|
||||
|
||||
- name: Run tests
|
||||
run: cargo xtask run-tests ${{ matrix.target.soc }}
|
||||
|
||||
# Test Xtensa targets:
|
||||
# TODO: Add jobs for Xtensa once supported by `probe-rs`
|
||||
|
@ -70,6 +70,10 @@ Our Virtual Machines have the following setup:
|
||||
- Devkit: `ESP32-H2-DevKitM-1` connected via USB-Serial-JTAG (`USB` port).
|
||||
- `GPIO2` and `GPIO4` are connected.
|
||||
- VM: Ubuntu 20.04.5 configured with the following [setup](#vm-setup)
|
||||
- ESP32-S3 (`esp32s3-usb`):
|
||||
- Devkit: `ESP32-S3-DevKitC-1` connected via USB-Serial-JTAG.
|
||||
- `GPIO2` and `GPIO4` are connected.
|
||||
- VM: Ubuntu 22.04.4 configured with the following [setup](#vm-setup)
|
||||
|
||||
[`hil.yml`]: https://github.com/esp-rs/esp-hal/blob/main/.github/workflows/hil.yml
|
||||
|
||||
@ -87,7 +91,7 @@ cargo install probe-rs --git=https://github.com/probe-rs/probe-rs --rev=ddd59fa
|
||||
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
|
||||
sudo usermod -a -G plugdev $USER
|
||||
# Reboot the
|
||||
# Reboot the VM
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
|
@ -151,6 +151,8 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
// TODO: See https://github.com/esp-rs/esp-hal/issues/1413
|
||||
#[cfg(not(any(feature = "esp32", feature = "esp32s2", feature = "esp32s3")))]
|
||||
fn test_gpio_interrupt(mut ctx: Context) {
|
||||
critical_section::with(|cs| {
|
||||
*COUNTER.borrow_ref_mut(cs) = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user