Skip to content

Commit

Permalink
Support --build-target all (#92)
Browse files Browse the repository at this point in the history
* Add support for --build-target all
  • Loading branch information
SergioGasquez authored Jun 27, 2022
1 parent 103b647 commit 0892775
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Instructions for ESP-C series based on RISC-V architecture are described in [RIS

- Linux:
- dependencies (command for Ubuntu/Debian):

```sh
apt-get install -y git curl gcc ninja-build cmake libudev-dev \
python3 python3-pip libusb-1.0-0 libssl-dev pkg-config libtinfo5
Expand Down Expand Up @@ -86,7 +86,7 @@ source export-esp-rust.sh
```
#### Arguments
- `-b|--build-target`: Comma separated list of targets [`esp32,esp32s2,esp32s3,esp32c3`]. Defaults to: `esp32,esp32s2,esp32s3`
- `-b|--build-target`: Comma separated list of targets [`esp32,esp32s2,esp32s3,esp32c3,all`]. Defaults to: `esp32,esp32s2,esp32s3`
- `-c|--cargo-home`: Cargo path.
- `-d|--toolchain-destination`: Toolchain instalation folder. Defaults to: `<rustup_home>/toolchains/esp`
- `-e|--extra-crates`: Extra crates to install. Defaults to: `ldproxy cargo-espflash`
Expand Down Expand Up @@ -186,7 +186,7 @@ When building for Xtensa targets, we need to [override the `esp` toolchain](http
[toolchain]
channel = "esp"
```

1. Get example source code

```sh
Expand Down
4 changes: 4 additions & 0 deletions install-rust-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ command -v rustup || install_rustup

source_cargo

if [[ "${BUILD_TARGET}" == all ]]; then
BUILD_TARGET="esp32,esp32s2,esp32s3,esp32c3"
fi

# Deploy missing toolchains - Xtensa toolchain should be used on top of these
if [[ "${BUILD_TARGET}" =~ esp32s[2|3] || "${BUILD_TARGET}" =~ esp32[,|\ ] || "${BUILD_TARGET}" =~ esp32$ ]]; then
rustup toolchain list | grep ${NIGHTLY_VERSION} || install_rust_toolchain ${NIGHTLY_VERSION}
Expand Down

0 comments on commit 0892775

Please sign in to comment.