aboutsummaryrefslogtreecommitdiff
path: root/examples/esp32c3/README.md
blob: 37d0167fb17fcbc4e0b604003f5ab9c319e0e20c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
### ESP32-C3 RTIC template
This crate showcases a simple RTIC application for the ESP32-C3.

## Prerequisites

# Nightly Rust
The ESP32-C3 HAL requires a nightly build of Rust.
Following the example of the (Espressif no_std book)[https://docs.esp-rs.org/no_std-training/02_2_software.html], we use this specific build:
```rustup toolchain install nightly-2023-11-14 --component rust-src --target riscv32imc-unknown-none-elf```

# Espressif toolchain

This crate uses the most convenient option in ``cargo-espflash`` and ``espflash``
```cargo install cargo-espflash espflash```

## Running the crate

```cargo run --example sw_and_hw --features=riscv-esp32c3-backend (--release)```

should do the trick.

# Expected behavior
The program
- Prints ``init``
- Enters a high prio task
- During the execution of the high prio task, the button should be non-functional
- Pends a low prio task
- Exits the high prio task
- Enters the low prio task
- During the execution of the low prio task, the button should be functional.
- Exits the low prio task
- Prints ``idle``