You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Two IEEE 802.15.4 radios are supported out of the box:
18
18
19
19
## Build
20
20
21
-
For certain MCUs / Rust targets, the OpenThread libraries are pre-compiled for convenience.
21
+
For certain MCUs / Rust targets, the OpenThread libraries are pre-compiled with a commonly used set of defaults for convenience. The defaults allow running a minimal thread device (MTD) that registers services using SRP.
22
22
Current list (might be extended upon request):
23
23
-`riscv32imac-unknown-none-elf` (ESP32C6 and ESP32H2)
24
24
-`thumbv7em-none-eabi` (NRF52)
@@ -30,7 +30,7 @@ Small caveat: since `openthread` does a few calls into the C standard library (p
30
30
31
31
### Build for other targets / custom build
32
32
33
-
For targets where pre-compiled libs are not available (including for the Host itself), a standard `build.rs` build is also supported.
33
+
For targets where pre-compiled libs are not available (including for the Host itself), or for when additional OpenThread features beyond the defaults are desired, a standard `build.rs` build is also supported.
34
34
For the on-the-fly OpenThread CMake build to work, you'll need to install and set in your `$PATH`:
35
35
- The GCC toolchain correspponding to your Rust target, with **working**`foo-bar-gcc -print-sysroot` command
36
36
- Recent Clang (for Espressif `xtensa`, [it must be the Espressif fork](https://crates.io/crates/espup), but for all other chips, the stock Clang would work)
@@ -41,10 +41,23 @@ As per above, since `openthread` does a few calls into the C standard library (p
41
41
Examples of GCC toolchains that are known to work fine:
42
42
- For ARM (Cortex M CPUs and others) - the [ARM GNU toolchain](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain);
43
43
- Note that the Ubuntu `arm-none-eabi-gcc` system package does **NOT** work, as it does not print a sysroot, i.e. `arm-none-eabi-gcc -print-sysroot` returns an empty response, and furthermore, the `newlib` headers are installed in a separate location from the arch headers;
44
-
- For RISCV - the [Espressif RISCV toolchain](https://github.com/espressif/crosstool-NG/releases). The ["official" RISCV GNU toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain) should also work;
44
+
- For RISCV - the [Espressif RISCV toolchain](https://github.com/espressif/crosstool-NG/releases). The ["official" RISCV GNU toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain) should also work (see below for guidance on building this);
45
45
- For xtensa (Espressif ESP32 and ESP32SXX MCUs) - the [Espressif xtensa toolchain](https://github.com/espressif/crosstool-NG/releases);
46
46
- For the Host machine (non-embedded) - your pre-installed toolchain would work just fine.
47
47
48
+
### Compiling the RISCV GNU Toolchain
49
+
As above, the requirements are for the toolchain to have `newlib`, so `--disable-linux` must be specified. For the `riscv32imac-unknown-none-elf` target (ESP32-C6 and ESP32-H2), the following options will produce a usable build:
0 commit comments