forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#111389 - esp-rs:esp-idf-platform-support, r…
…=jyn514 Add esp-idf platform-support page As mentioned in rust-lang#111369 (comment), the initial PR for esp-idf didn't include a platform support document which is required for the merge of rust-lang#111369.
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# `*-esp-espidf` | ||
|
||
**Tier: 3** | ||
|
||
Targets for the [ESP-IDF](https://github.com/espressif/esp-idf) development framework running on RISC-V and Xtensa CPUs. | ||
|
||
## Target maintainers | ||
|
||
- Ivan Markov [@ivmarkov](https://github.com/ivmarkov) | ||
- Scott Mabin [@MabezDev](https://github.com/MabezDev) | ||
|
||
## Requirements | ||
|
||
The target names follow this format: `$ARCH-esp-espidf`, where `$ARCH` specifies the target processor architecture. The following targets are currently defined: | ||
|
||
| Target name | Target CPU(s) | | ||
|--------------------------------|-----------------------| | ||
| `riscv32imc-esp-espidf` | [ESP32-C3](https://www.espressif.com/en/products/socs/esp32-c3) | | ||
|
||
The minimum supported ESP-IDF version is `v4.3`, though it is recommended to use the latest stable release if possible. | ||
|
||
## Building the target | ||
|
||
The target can be built by enabling it for a `rustc` build. The `build-std` feature is required to build the standard library for ESP-IDF. `ldproxy` is also required for linking, it can be installed from crates.io. | ||
|
||
```toml | ||
[build] | ||
target = ["$ARCH-esp-espidf"] | ||
|
||
[target.$ARCH-esp-espidf] | ||
linker = "ldproxy" | ||
|
||
[unstable] | ||
build-std = ["std", "panic_abort"] | ||
``` | ||
|
||
The `esp-idf-sys` crate will handle the compilation of ESP-IDF, including downloading the relevant toolchains for the build. | ||
|
||
## Cross-compilation toolchains and C code | ||
|
||
`esp-idf-sys` exposes the toolchain used in the compilation of ESP-IDF, see the crate [documentation for build output propagation](https://github.com/esp-rs/esp-idf-sys#conditional-compilation) for more information. |