diff --git a/src/SUMMARY.md b/src/SUMMARY.md index d26695f..c28c849 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -6,6 +6,7 @@ - [Dev Environment](./dev-env.md) - [Quick Start](./quick-start.md) - [Async and Embassy](./embassy.md) + - [FAQ](./faq.md) - [Core Concepts](./core-concepts/index.md) - [Voltage Divider](./core-concepts/voltage-divider.md) - [ADC](./core-concepts/adc/index.md) @@ -113,4 +114,16 @@ - [GATT](./bluetooth/ble/gatt.md) - [Code](./bluetooth/ble/code.md) - [Notification](./bluetooth/ble/notification.md) + - [Projects](./projects.md) diff --git a/src/dev-env.md b/src/dev-env.md index 5a7bfd0..0dd9f0c 100644 --- a/src/dev-env.md +++ b/src/dev-env.md @@ -20,4 +20,19 @@ cargo binstall espflash After installation, type the espflash command to verify that it works. +## Toolchains for RISC-V and Xtensa Targets + +You will also need `espup` to install the necessary toolchains. You can find details [here](https://docs.esp-rs.org/book/installation/riscv-and-xtensa.html). + +```sh +cargo install espup +espup install +``` + +If you want to use the project I created as it is, you might need the exact Rust toolchain version. You can use this command: +```rust +espup install --toolchain-version 1.82.0 +``` + +However, I recommend reading the book, understand the concepts and code, and apply them to a newer version. You might face challenges, but you'll learn and even contribute back to this book 😉. diff --git a/src/faq.md b/src/faq.md new file mode 100644 index 0000000..49e2e6e --- /dev/null +++ b/src/faq.md @@ -0,0 +1,29 @@ +# FAQ + + +### 1. Can I use other ESP32 dev boards? + +Yes, you can use the code on most dev boards with an "ESP32" chip. However, pinouts may differ, so you might need to make some adjustments. Other than that, everything should work fine! + +### 2. Can I use other ESP32 family chips like ESP32-C3? +Yes, but the code may not work as is. ESP32 variants have different configurations-some may lack Bluetooth or Wi-Fi, while others have different specs. While some code may work across ESP32 variants, differences in architecture, peripherals, and GPIO mapping might require modifications. + +You can still read the concepts and try applying them to your chip. For adjustments, refer to the official ESP-HAL examples: +[ESP-HAL Examples](https://github.com/esp-rs/esp-hal/tree/main/examples) + +That said, I highly recommend getting an **ESP32 Devkit V1** board for a smoother experience. It's cheap and works well with the examples in this book. Later, you can experiment with other ESP32 variants! + +### 3. I cloned the project, but it's giving errors. What should I do? + +If you cloned the example projects from the book and encountered errors, it's likely due to a Rust toolchain version mismatch. Since these projects use a **nightly** Rust version, breaking changes can occur over time. + +#### What can you do? +You have two options: + +1. **Generate a new project with `esp-generate`** as mentioned in the exercies + - You can then refer to the book's code and tweak it if needed. + +2. **Downgrade your Rust toolchain to match the book** + - You can check the nightly version used in this book's projects [here](./dev-env.md#toolchains-for-risc-v-and-xtensa-targets). + - Install the matching version to ensure compatibility. +