Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support --build-target all #92

Merged
merged 4 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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