docs: update installation instructions for 1.54.0 (#20)
* docs: update installation instructions for 1.54.0 * docker: publish idf-rust image under Espressif account
This commit is contained in:
parent
ff5909f466
commit
d6f26b645b
|
|
@ -19,4 +19,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: georgikrocks/esp-idf-rust:latest
|
tags: espressif/idf-rust:latest
|
||||||
|
|
|
||||||
25
Dockerfile
25
Dockerfile
|
|
@ -6,22 +6,29 @@ ENV LANG=C.UTF-8
|
||||||
ENV RUSTUP_HOME=/opt/rust
|
ENV RUSTUP_HOME=/opt/rust
|
||||||
ENV CARGO_HOME=/opt/cargo
|
ENV CARGO_HOME=/opt/cargo
|
||||||
ENV PATH=/opt/cargo/bin:/opt/rust/bin:/opt/xtensa-esp32-elf-clang/bin:$PATH
|
ENV PATH=/opt/cargo/bin:/opt/rust/bin:/opt/xtensa-esp32-elf-clang/bin:$PATH
|
||||||
|
|
||||||
|
ARG VERSION="1.54.0-dev"
|
||||||
|
ARG ARCH="x86_64-unknown-linux-gnu"
|
||||||
|
ARG RUST_DIST="rust-${VERSION}-${ARCH}"
|
||||||
|
ARG RUST_SRC_DIST="rust-src-${VERSION}"
|
||||||
|
ARG TOOLCHAIN_DESTINATION_DIR="/opt/esp"
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | bash -s -- --profile minimal --default-toolchain nightly -y
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- --profile minimal --default-toolchain nightly -y
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
RUN wget -q https://dl.espressif.com/dl/idf-rust/dist/x86_64-unknown-linux-gnu/rust-1.53.0-dev-x86_64-unknown-linux-gnu.tar.xz \
|
RUN wget -q https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/${RUST_DIST}.tar.xz \
|
||||||
&& tar xvf rust-1.53.0-dev-x86_64-unknown-linux-gnu.tar.xz \
|
&& tar xvf ${RUST_DIST}.tar.xz \
|
||||||
&& ./rust-1.53.0-dev-x86_64-unknown-linux-gnu/install.sh --destdir=/opt/esp --prefix="" --without=rust-docs \
|
&& ./${RUST_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs \
|
||||||
&& rm -rf rust-1.53.0-dev-x86_64-unknown-linux-gnu*
|
&& rm -rf ${RUST_DIST} ${RUST_DIST}.tar.xz
|
||||||
|
|
||||||
RUN wget -q https://dl.espressif.com/dl/idf-rust/dist/noarch/rust-src-1.53.0-dev.tar.xz \
|
RUN wget -q https://dl.espressif.com/dl/idf-rust/dist/noarch/${RUST_SRC_DIST}.tar.xz \
|
||||||
&& tar xvf rust-src-1.53.0-dev.tar.xz \
|
&& tar xvf ${RUST_SRC_DIST}.tar.xz \
|
||||||
&& ./rust-src-1.53.0-dev/install.sh --destdir=/opt/esp --prefix="" --without=rust-docs \
|
&& ./${RUST_SRC_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs \
|
||||||
&& rm -rf rust-src-1.53.0-dev* \
|
&& rm -rf ${RUST_SRC_DIST} ${RUST_SRC_DIST}.tar.xz \
|
||||||
&& rustup toolchain link esp /opt/esp \
|
&& rustup toolchain link esp /opt/esp \
|
||||||
&& rustup default esp
|
&& rustup default esp
|
||||||
|
|
||||||
RUN wget -q https://dl.espressif.com/dl/idf-rust/dist/x86_64-unknown-linux-gnu/xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz \
|
RUN wget -q https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz \
|
||||||
&& tar xf xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz \
|
&& tar xf xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz \
|
||||||
&& rm xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz
|
&& rm xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,69 @@
|
||||||
# Rust on Xtensa Installation for macOS M1
|
# Rust on Xtensa Installation for macOS M1
|
||||||
|
|
||||||
|
Following instructions are specific for ESP32 and ESP32-S series based on Xtensa architecture.
|
||||||
|
|
||||||
|
Instructions for ESP-C series based on RISC-V architecture are described in document for [ESP32-C3](../README.md#esp32-c3).
|
||||||
|
|
||||||
Tested OS: macOS Big Sur M1
|
Tested OS: macOS Big Sur M1
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- rustup - https://rustup.rs/
|
- rustup - https://rustup.rs/
|
||||||
|
|
||||||
## Commands
|
## Installation commands
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rustup toolchain install nightly
|
rustup toolchain install nightly
|
||||||
|
|
||||||
mkdir -p ~/.rustup/toolchains/esp
|
VERSION="1.54.0-dev"
|
||||||
|
ARCH="aarch64-apple-darwin"
|
||||||
|
RUST_DIST="rust-${VERSION}-${ARCH}"
|
||||||
|
RUST_SRC_DIST="rust-src-${VERSION}"
|
||||||
|
TOOLCHAIN_DESTINATION_DIR="~/.rustup/toolchains/esp"
|
||||||
|
|
||||||
wget --continue https://dl.espressif.com/dl/idf-rust/dist/aarch64-apple-darwin/rust-1.53.0-dev-aarch64-apple-darwin.tar.xz
|
mkdir -p ${TOOLCHAIN_DESTINATION_DIR}
|
||||||
tar xvf rust-1.53.0-dev-aarch64-apple-darwin.tar.xz
|
|
||||||
./rust-1.53.0-dev-aarch64-apple-darwin/install.sh --destdir=~/.rustup/toolchains/esp --prefix="" --without=rust-docs
|
|
||||||
|
|
||||||
wget --continue https://dl.espressif.com/dl/idf-rust/dist/noarch/rust-src-1.53.0-dev.tar.xz
|
wget "https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/${RUST_DIST}.tar.xz"
|
||||||
tar xvf rust-src-1.53.0-dev.tar.xz
|
tar xvf ${RUST_DIST}.tar.xz
|
||||||
./rust-src-1.53.0-dev/install.sh --destdir=~/.rustup/toolchains/esp --prefix=""
|
./${RUST_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs
|
||||||
|
|
||||||
|
wget "https://dl.espressif.com/dl/idf-rust/dist/noarch/${RUST_SRC_DIST}.tar.xz"
|
||||||
|
tar xvf ${RUST_SRC_DIST}.tar.xz
|
||||||
|
./${RUST_SRC_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs
|
||||||
|
|
||||||
rustup default esp
|
rustup default esp
|
||||||
|
|
||||||
wget --continue https://dl.espressif.com/dl/idf-rust/dist/aarch64-apple-darwin/xtensa-esp32-elf-llvm11_0_0-aarch64-apple-darwin.tar.xz
|
wget --continue "https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/xtensa-esp32-elf-llvm11_0_0-aarch64-apple-darwin.tar.xz"
|
||||||
tar xf xtensa-esp32-elf-llvm11_0_0-aarch64-apple-darwin.tar.xz
|
tar xf xtensa-esp32-elf-llvm11_0_0-aarch64-apple-darwin.tar.xz
|
||||||
export PATH="`pwd`/xtensa-esp32-elf-clang/bin/:$PATH"
|
export PATH="`pwd`/xtensa-esp32-elf-clang/bin/:$PATH"
|
||||||
|
|
||||||
wget --continue https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip
|
wget --continue https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip
|
||||||
unzip main.zip
|
unzip main.zip
|
||||||
cd rust-esp32-example-main
|
cd rust-esp32-example-main
|
||||||
idf.py build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Select architecture for the build
|
||||||
|
|
||||||
|
For the ESP32 - default (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S2 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s2
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S3 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build and flash
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py build flash
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,68 @@
|
||||||
# Rust on Xtensa Installation for macOS x64
|
# Rust on Xtensa Installation for macOS x64
|
||||||
|
|
||||||
Tested OS: macOS Big Sur x64
|
Following instructions are specific for ESP32 and ESP32-S series based on Xtensa architecture.
|
||||||
|
|
||||||
|
Instructions for ESP-C series based on RISC-V architecture are described in document for [ESP32-C3](../README.md#esp32-c3).
|
||||||
|
|
||||||
|
Tested OS: macOS Big Sur x64
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- rustup - installed with nightly toolchain - https://rustup.rs/
|
- rustup - installed with nightly toolchain - https://rustup.rs/
|
||||||
|
|
||||||
## Commands
|
## Installation commands
|
||||||
|
|
||||||
```
|
```sh
|
||||||
rustup toolchain install nightly
|
rustup toolchain install nightly
|
||||||
|
|
||||||
mkdir -p ~/.rustup/toolchains/esp
|
VERSION="1.54.0-dev"
|
||||||
|
ARCH="x86_64-apple-darwin"
|
||||||
|
RUST_DIST="rust-${VERSION}-${ARCH}"
|
||||||
|
RUST_SRC_DIST="rust-src-${VERSION}"
|
||||||
|
TOOLCHAIN_DESTINATION_DIR="~/.rustup/toolchains/esp"
|
||||||
|
|
||||||
wget https://dl.espressif.com/dl/idf-rust/dist/x86_64-apple-darwin/rust-1.53.0-dev-x86_64-apple-darwin.tar.xz
|
mkdir -p ${TOOLCHAIN_DESTINATION_DIR}
|
||||||
tar xvf rust-1.53.0-dev-x86_64-apple-darwin.tar.xz
|
|
||||||
./rust-1.53.0-dev-x86_64-apple-darwin/install.sh --destdir=~/.rustup/toolchains/esp --prefix="" --without=rust-docs
|
|
||||||
|
|
||||||
wget https://dl.espressif.com/dl/idf-rust/dist/noarch/rust-src-1.53.0-dev.tar.xz
|
wget "https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/${RUST_DIST}.tar.xz"
|
||||||
tar xvf rust-src-1.53.0-dev.tar.xz
|
tar xvf ${RUST_DIST}.tar.xz
|
||||||
./rust-src-1.53.0-dev/install.sh --destdir=~/.rustup/toolchains/esp --prefix="" --without=rust-docs
|
./${RUST_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs
|
||||||
|
|
||||||
|
wget "https://dl.espressif.com/dl/idf-rust/dist/noarch/${RUST_SRC_DIST}.tar.xz"
|
||||||
|
tar xvf ${RUST_SRC_DIST}.tar.xz
|
||||||
|
./${RUST_SRC_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs
|
||||||
|
|
||||||
rustup default esp
|
rustup default esp
|
||||||
|
|
||||||
wget https://dl.espressif.com/dl/idf-rust/dist/x86_64-apple-darwin/xtensa-esp32-elf-llvm11_0_0-x86_64-apple-darwin.tar.xz
|
wget "https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/xtensa-esp32-elf-llvm11_0_0-x86_64-apple-darwin.tar.xz"
|
||||||
tar xf xtensa-esp32-elf-llvm11_0_0-x86_64-apple-darwin.tar.xz
|
tar xf xtensa-esp32-elf-llvm11_0_0-x86_64-apple-darwin.tar.xz
|
||||||
export PATH="`pwd`/xtensa-esp32-elf-clang/bin/:$PATH"
|
export PATH="`pwd`/xtensa-esp32-elf-clang/bin/:$PATH"
|
||||||
|
|
||||||
wget --continue https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip
|
wget --continue https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip
|
||||||
unzip main.zip
|
unzip main.zip
|
||||||
cd rust-esp32-example-main
|
cd rust-esp32-example-main
|
||||||
idf.py build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Select architecture for the build
|
||||||
|
|
||||||
|
For the ESP32 - default (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S2 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s2
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S3 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build and flash
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py build flash
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
# Rust on Xtensa Installation for Windows x64
|
# Rust on Xtensa Installation for Windows x64
|
||||||
|
|
||||||
|
Following instructions are specific for ESP32 and ESP32-S series based on Xtensa architecture.
|
||||||
|
|
||||||
|
Instructions for ESP-C series based on RISC-V architecture are described in document for [ESP32-C3](../README.md#esp32-c3).
|
||||||
|
|
||||||
Tested OS: Windows 10 x64
|
Tested OS: Windows 10 x64
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
@ -8,41 +12,58 @@ Tested OS: Windows 10 x64
|
||||||
- rustup - installed with nightly toolchain - https://rustup.rs/
|
- rustup - installed with nightly toolchain - https://rustup.rs/
|
||||||
- Chocolatey - https://chocolatey.org/
|
- Chocolatey - https://chocolatey.org/
|
||||||
|
|
||||||
## Commands for PowerShell
|
## Installation commands for PowerShell
|
||||||
|
|
||||||
```
|
```sh
|
||||||
choco install 7zip
|
choco install 7zip
|
||||||
|
|
||||||
rustup toolchain install nightly
|
rustup toolchain install nightly
|
||||||
|
|
||||||
mkdir -p ~\.rustup\toolchains\esp
|
$Version="1.54.0-dev"
|
||||||
|
$Arch="x86_64-pc-windows-msvc"
|
||||||
|
$RustDist="rust-${VERSION}-${ARCH}"
|
||||||
|
|
||||||
Invoke-WebRequest https://dl.espressif.com/dl/idf-rust/dist/x86_64-pc-windows-msvc/rust-1.53.0-dev-x86_64-pc-windows-msvc.tar.xz -OutFile rust-1.53.0-dev-x86_64-pc-windows-msvc.tar.xz
|
mkdir -p ~\.rustup\toolchains\ -ErrorAction SilentlyContinue
|
||||||
7z e .\rust-1.53.0-dev-x86_64-pc-windows-msvc.tar.xz
|
pushd ~\.rustup\toolchains\
|
||||||
7z x .\rust-1.53.0-dev-x86_64-pc-windows-msvc.tar
|
|
||||||
pushd rust-1.53.0-dev-x86_64-pc-windows-msvc
|
|
||||||
cp -Recurse .\rustc\bin ~\.rustup\toolchains\esp\
|
|
||||||
cp -Recurse .\rustc\lib ~\.rustup\toolchains\esp\
|
|
||||||
cp -Recurse .\rustc\share ~\.rustup\toolchains\esp\
|
|
||||||
cp -ErrorAction SilentlyContinue -Recurse .\rust-std-x86_64-pc-windows-msvc\lib\* ~\.rustup\toolchains\esp\lib\
|
|
||||||
popd
|
|
||||||
|
|
||||||
Invoke-WebRequest https://dl.espressif.com/dl/idf-rust/dist/noarch/rust-src-1.53.0-dev.tar.xz -OutFile rust-src-1.53.0-dev.tar.xz
|
Invoke-WebRequest "https://dl.espressif.com/dl/idf-rust/dist/${Arch}/${RustDist}.zip" -OutFile "${RustDist}.zip"
|
||||||
7z e .\rust-src-1.53.0-dev.tar.xz
|
7z x .\${RustDist}.zip
|
||||||
7z x .\rust-src-1.53.0-dev.tar
|
|
||||||
pushd rust-src-1.53.0-dev
|
|
||||||
cp -ErrorAction SilentlyContinue -Recurse .\rust-src\lib\* ~\.rustup\toolchains\esp\lib\
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rustup default esp
|
rustup default esp
|
||||||
|
|
||||||
Invoke-WebRequest https://dl.espressif.com/dl/idf-rust/dist/x86_64-pc-windows-msvc/xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-win64.zip -OutFile xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-win64.zip
|
Invoke-WebRequest https://dl.espressif.com/dl/idf-rust/dist/${Arch}/xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-win64.zip -OutFile xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-win64.zip
|
||||||
7z x xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-win64.zip
|
7z x xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-win64.zip
|
||||||
$ClangPath=Join-Path -Path (Get-Location) -ChildPath xtensa-esp32-elf-clang\bin
|
$env:LIBCLANG_PATH=Join-Path -Path (Get-Location) -ChildPath xtensa-esp32-elf-clang\bin
|
||||||
$env:PATH="${ClangPath};$env:PATH"
|
$env:PATH+=";$env:LIBCLANG_PATH"
|
||||||
|
|
||||||
Invoke-WebRequest https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip -OutFile rust-esp32-example.zip
|
Invoke-WebRequest https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip -OutFile rust-esp32-example.zip
|
||||||
7z x rust-esp32-example.zip
|
7z x rust-esp32-example.zip
|
||||||
cd rust-esp32-example-main
|
cd rust-esp32-example-main
|
||||||
idf.py build
|
```
|
||||||
|
|
||||||
|
## Select architecture for the build
|
||||||
|
|
||||||
|
For the ESP32 - default (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S2 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s2
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S3 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build and flash
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py build flash
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,71 @@
|
||||||
# Rust on Xtensa Installation for Linux x64
|
# Rust on Xtensa Installation for Linux x64
|
||||||
|
|
||||||
|
Following instructions are specific for ESP32 and ESP32-S series based on Xtensa architecture.
|
||||||
|
|
||||||
|
Instructions for ESP-C series based on RISC-V architecture are described in document for [ESP32-C3](../README.md#esp32-c3).
|
||||||
|
|
||||||
Tested OS: Ubuntu 18 x64, Ubuntu 20 x64, Mint 20 x64, OpenSUSE Thumbleweed
|
Tested OS: Ubuntu 18 x64, Ubuntu 20 x64, Mint 20 x64, OpenSUSE Thumbleweed
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- rustup - installed with nightly toolchain - https://rustup.rs/
|
- rustup - installed with nightly toolchain - https://rustup.rs/
|
||||||
|
|
||||||
## Commands
|
## Installation commands
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo apt install gcc wget xz-utils
|
sudo apt install gcc wget xz-utils
|
||||||
|
|
||||||
rustup toolchain install nightly
|
rustup toolchain install nightly
|
||||||
|
|
||||||
mkdir -p ~/.rustup/toolchains/esp
|
VERSION="1.54.0-dev"
|
||||||
|
ARCH="x86_64-unknown-linux-gnu"
|
||||||
|
RUST_DIST="rust-${VERSION}-${ARCH}"
|
||||||
|
RUST_SRC_DIST="rust-src-${VERSION}"
|
||||||
|
TOOLCHAIN_DESTINATION_DIR="~/.rustup/toolchains/esp"
|
||||||
|
|
||||||
wget https://dl.espressif.com/dl/idf-rust/dist/x86_64-unknown-linux-gnu/rust-1.53.0-dev-x86_64-unknown-linux-gnu.tar.xz
|
mkdir -p ${TOOLCHAIN_DESTINATION_DIR}
|
||||||
tar xvf rust-1.53.0-dev-x86_64-unknown-linux-gnu.tar.xz
|
|
||||||
./rust-1.53.0-dev-x86_64-unknown-linux-gnu/install.sh --destdir=~/.rustup/toolchains/esp --prefix="" --without=rust-docs
|
|
||||||
|
|
||||||
wget https://dl.espressif.com/dl/idf-rust/dist/noarch/rust-src-1.53.0-dev.tar.xz
|
wget https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/${RUST_DIST}.tar.xz
|
||||||
tar xvf rust-src-1.53.0-dev.tar.xz
|
tar xvf ${RUST_DIST}.tar.xz
|
||||||
./rust-src-1.53.0-dev/install.sh --destdir=~/.rustup/toolchains/esp --prefix="" --without=rust-docs
|
./${RUST_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs
|
||||||
|
|
||||||
|
wget https://dl.espressif.com/dl/idf-rust/dist/noarch/${RUST_SRC_DIST}.tar.xz
|
||||||
|
tar xvf ${RUST_SRC_DIST}.tar.xz
|
||||||
|
./${RUST_SRC_DIST}/install.sh --destdir=${TOOLCHAIN_DESTINATION_DIR} --prefix="" --without=rust-docs
|
||||||
|
|
||||||
rustup default esp
|
rustup default esp
|
||||||
|
|
||||||
wget https://dl.espressif.com/dl/idf-rust/dist/x86_64-unknown-linux-gnu/xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz
|
wget https://dl.espressif.com/dl/idf-rust/dist/${ARCH}/xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz
|
||||||
tar xf xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz
|
tar xf xtensa-esp32-elf-llvm11_0_0-llvmorg-11-init-21249-g36dbc8b-linux-amd64.tar.xz
|
||||||
export PATH="`pwd`/xtensa-esp32-elf-clang/bin/:$PATH"
|
export PATH="`pwd`/xtensa-esp32-elf-clang/bin/:$PATH"
|
||||||
|
|
||||||
wget --continue https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip
|
wget --continue https://github.com/espressif/rust-esp32-example/archive/refs/heads/main.zip
|
||||||
unzip main.zip
|
unzip main.zip
|
||||||
cd rust-esp32-example-main
|
cd rust-esp32-example-main
|
||||||
idf.py build
|
```
|
||||||
|
|
||||||
|
## Select architecture for the build
|
||||||
|
|
||||||
|
For the ESP32 - default (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S2 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s2
|
||||||
|
```
|
||||||
|
|
||||||
|
For the ESP32-S3 (Xtensa architecture):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py set-target esp32s3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build and flash
|
||||||
|
|
||||||
|
```sh
|
||||||
|
idf.py build flash
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
# Rust on ESP32 (Xtensa)
|
# Rust on ESP32 and ESP32-S series (Xtensa)
|
||||||
|
|
||||||
|
Following instructions are specific for ESP32 and ESP32-S series based on Xtensa architecture.
|
||||||
|
|
||||||
|
Instructions for ESP-C series based on RISC-V architecture are described in document for [ESP32-C3](../README.md#esp32-c3).
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue