Skip to content
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
10 changes: 10 additions & 0 deletions src/getting-started/tooling/esp-generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ cargo install esp-generate --locked

You can also directly download pre-compiled [release binaries][release-binaries] or use [`cargo-binstall`][cargo-binstall].

## What `esp-generate` Сonfigures

`esp-generate` provides more than dependency selection: it applies a known set of crates and feature combinations corresponding to the chosen template options, reducing the amount of manual configuration required to produce a working project.

When options are selected for the template, `esp-generate` updates the generated `Cargo.toml` with the crates and Cargo features those choices require. The templates aim to keep that list as short as practical while still creating a skeleton of an applications that builds and runs for the selected profile, without the need to manually configure the dependencies for the first successful build.

The [Ancillary Crates](../../introduction/ancillary-crates.md) chapter describes how wireless, async, and networking choices map onto individual crates when that level of detail is needed.

Some options have coupled configurations. Logging is configured either via `defmt` or `log` with a corresponding frontend. Certain crates are also included as part of the standard baseline because they support common embedded workflows. For example, `esp-bootloader-esp-idf` includes additional support of 2nd stage bootloader, and `critical-section` is included because many embedded crates rely on it to implement interrupt-critical regions.

> [!TIP]
> Each version of `esp-generate` targets a specific version of the ecosystem crates. Make sure to update `esp-generate` if you want to use the latest released versions.

Expand Down
3 changes: 2 additions & 1 deletion src/introduction/ancillary-crates.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

The core crate that ties all work with Espressif chips in Rust is the `esp-hal` crate. Through it, you will be able to perform basic initialization of the chip, as well as access drivers for the peripherals available on the chip. The full [`esp-hal` documentation] for selected chip will give unambiguous information about what peripherals are available to use, and the stability of their respective drivers.

Furthermore, you may want to use more advanced functionality of the chip. For example, network and connectivity. This part of the ecosystem is the responsibility of `esp-radio`, which combines drivers for the communication protocols available on one or another of Espressif's products: `Wi-Fi`, `BLE`, `esp-now` and low-level `IEEE 802.15.4` for the lower layers of communication. More detailed information for each chip is available in the [`esp-radio` sub-repository].
Furthermore, you may want to use more advanced functionality of the chip. For example, network and connectivity. This part of the ecosystem is the responsibility of `esp-radio`, which combines drivers for the communication protocols available on one or another of Espressif's products: `Wi-Fi`, `BLE`, `esp-now` and low-level `IEEE 802.15.4` for the lower layers of communication. More detailed information for each chip is available in the [`esp-radio` sub-repository]. It is also worth mentioning that radio support requires the stack to run continuously in the background (timers, interrupts, state machines). `esp-radio` relies on an implementation of [`esp-radio-rtos-driver`], which defines the scheduling and runtime interface the stack needs to run reliably. `esp-rtos` is the default backend we ship and support; in principle user is free replace it with another implementation of the driver. `esp-generate` will add `esp-rtos` automatically when you enable the appropriate template options.

For more advanced work with chip memory and to use collections from the `alloc` crate in `no_std` that require heap allocation, you are welcome to use `esp-alloc`. A separate [chapter in the book](./../application-development/alloc.md) is devoted to this.

Expand Down Expand Up @@ -46,10 +46,11 @@

## Embedded Rust Ecosystem Integration

The most popular Hardware Abstraction Layer in the Embedded Rust environment is [`embedded-hal`], which provides a number of traits for several peripherals that allow writing HAL agnostic device drivers. `esp-hal` implements these traits within its drivers. In addition, various traits from different crates used in the embedded Rust industry have also been implemented, such as [`rand_core`] traits for our Random Number Generator (RNG) peripheral, as well as [`embedded-io`] traits, which are analogues of `std::io` traits for `no_std` applications.

Check warning on line 49 in src/introduction/ancillary-crates.md

View workflow job for this annotation

GitHub Actions / build

[vale] reported by reviewdog 🐶 [Microsoft.Wordiness] Consider using 'also' instead of 'In addition'. Raw Output: {"message": "[Microsoft.Wordiness] Consider using 'also' instead of 'In addition'.", "location": {"path": "src/introduction/ancillary-crates.md", "range": {"start": {"line": 49, "column": 259}}}, "severity": "INFO"}

[`esp-hal` documentation]: https://docs.espressif.com/projects/rust/esp-hal/latest/
[`esp-radio` sub-repository]: https://github.com/esp-rs/esp-hal/tree/main/esp-radio
[`esp-radio-rtos-driver`]: https://github.com/esp-rs/esp-hal/tree/main/esp-radio-rtos-driver
[`embedded-hal`]: https://docs.rs/embedded-hal/latest/embedded_hal/index.html
[`rand_core`]: https://crates.io/crates/rand_core
[`embedded-io`]: https://crates.io/crates/embedded-io
Loading