container: add podman, monitor and flashing (#31)
* container: add podman, monitor and flashing
This commit is contained in:
parent
bf6eff31b1
commit
ad2066cf60
|
|
@ -1,4 +1,4 @@
|
|||
name: Publish idf-rust image on DockerHub
|
||||
name: Publish idf-rust-examples image on DockerHub
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ RUN apt update \
|
|||
&& apt install -y vim nano
|
||||
|
||||
# Dependency for Cargo first example
|
||||
RUN cargo install cargo-pio
|
||||
RUN cargo install cargo-pio ldproxy espflash
|
||||
|
||||
COPY support/idf-rust-examples/entrypoint.sh /opt/esp/entrypoint.sh
|
||||
COPY support/idf-rust-examples/motd /etc/motd
|
||||
|
|
|
|||
12
README.md
12
README.md
|
|
@ -12,7 +12,17 @@ First, install the ESP-IDF SDK as shown in the [Get Started](https://docs.espres
|
|||
|
||||
To support the Xtensa instruction set, build and install custom LLVM and Rust toolchains as shown in the [Rust On Xtensa](docs/rust-on-xtensa.md) guide.
|
||||
|
||||
Alternatively you might build the project in the container where image already contains pre-installed Rust and ESP-IDF:
|
||||
#### Podman/Docker image
|
||||
|
||||
Alternatively you might build the project in the container where image already contains pre-installed Rust and ESP-IDF.
|
||||
|
||||
Podman example with mapping multiple /dev/ttyUSB from host computer to the container:
|
||||
|
||||
```
|
||||
podman run -it espressif/idf-rust-examples --device /dev/ttyUSB0 --device /dev/ttyUSB1
|
||||
```
|
||||
|
||||
Docker (does not support flashing from container):
|
||||
|
||||
```
|
||||
docker run -it espressif/idf-rust-examples
|
||||
|
|
|
|||
|
|
@ -5,15 +5,16 @@
|
|||
|
||||
Available examples:
|
||||
|
||||
* "cargo-first" approach
|
||||
```sh
|
||||
cd /opt/rust-esp32-std-hello
|
||||
cargo build --release
|
||||
espflash /dev/ttyUSB0 target/xtensa-esp32-espidf/release/rust-esp32-std-hello
|
||||
cargo pio espidf monitor -e release /dev/ttyUSB0
|
||||
```
|
||||
|
||||
* "idf.py-first" approach - integration via CMake files
|
||||
```sh
|
||||
cd /opt/rust-esp32-example
|
||||
idf.py build
|
||||
```
|
||||
|
||||
* "cargo-first" approach
|
||||
```sh
|
||||
cd /opt/rust-esp32-std-hello
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue