Skip to content

Commit

Permalink
docs: Update 26mhz troubleshoot section
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Mar 21, 2024
1 parent 562ba85 commit 3e1f5b9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
1 change: 1 addition & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ additional-js = ["assets/mermaid.min.js", "assets/mermaid-init.js"]
"/debugging/vscode-debugging.html" = "https://esp-rs.github.io/book/debugging/vscode.html"
"/writing-your-own-application/no-std-applications/understanding-esp-template.html" = "https://esp-rs.github.io/book/writing-your-own-application/generate-project/esp-template.html"
"installation/installation.html" = "https://esp-rs.github.io/book/installation/index.html"
"troubleshooting/espflash.html" = "https://esp-rs.github.io/book/troubleshooting/index.html"

[preprocessor.mermaid]
command = "mdbook-mermaid"
22 changes: 0 additions & 22 deletions src/troubleshooting/espflash.md

This file was deleted.

20 changes: 19 additions & 1 deletion src/troubleshooting/std.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# `esp-idf-hal` based projects
# `esp-idf-sys` based projects

## Wrong Xtal Frequency

Using a 26 Mhz crystal instead of a 40 MHz requires modifying the [`sdkconfig`][sdkconfig]. Add the following configuration option to your `sdkconfig` file:

```
CONFIG_XTAL_FREQ_26=y
```

After making this adjustment, execute `cargo clean` to ensure that the changes are properly incorporated into your project. See [`sdkconfig` section](#sdkconfigdefaults-file-is-updated-but-it-doesnt-appear-to-have-had-any-effect).

When using an `esp-idf-sys` based project, you should also prefer using `cargo-espflash` instead of `espflash`. `cargo-espflash` integrates with your
project and it will flash the bootloader and partition table that is built for your project instead of the default one, see the corresponding [`cargo-espflash` readme section][cargo-espflash-bootloader].

If you want to use `espflash`, you can specify an appropriate bootloader and partition table using `--bootloader` and `--partition-table`. You can find the bootloader in `target/<your MCU's target folder>/<debug or release depending on your build>/bootloader.bin` and partition table in `target/<your MCU's target folder>/<debug or release depending on your build>/partition-table.bin`

[sdkconfig]: ttps://github.com/esp-rs/esp-idf-sys/blob/master/BUILD-OPTIONS.md#sdkconfig
[cargo-espflash-bootloader]: https://github.com/esp-rs/espflash/tree/main/cargo-espflash#bootloader-and-partition-table

## Environment Variable `LIBCLANG_PATH` Not Set

Expand Down

0 comments on commit 3e1f5b9

Please sign in to comment.