Some chips can have more than 16MB of flash, mine as 32MB. Historically
espflash failed to detect this flash size but now can. Without this
change the board will boot loop because the esp idf bootloader max size
is only 16MB.
* feat: ✨ Add flash_freq to Esp32Params
* feat: ✨ Add flash_freq for all targets
* feat: ✨ Use the params flash_freq if no freq argment was used
* test: 🧪 Fix tests
* feat: ⚡️ Update default freq
* If exactly one port matches, use it
* Update espflash/src/cli/serial.rs
Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
---------
Co-authored-by: Sergio Gasquez Arcos <sergio.gasquez@gmail.com>
* Ignore CLion project.
* Disable watchdog timer before build.
* Fix formatting.
* Re-enable the code to disable the watchdog, even if the flash stub is in use.
* Update stubs from v4.5 release of espflash
* Disable RTC watchdog when not using the stub
- Re add explicit RTC watchdog disable when **not** using the stub
- Add support for disabling esp32c6 RTC watchdog
* fix: esp32c3 direct-boot format
Prior to this change, attempting to `espflash flash` with the `--format
direct-boot` argument targeting an esp32c3 would fail, reporting:
```
Error: espflash::unsupported_image_format
× Image format direct-boot is not supported by the esp32c3 revision v0.3
help: The esp32c3 only supports direct-boot starting with revision 3
```
However, direct-boot on this board was working prior to the changes in
b25af06, and looking at the [docs][esp32c3 revisions] it seems that the
mapping that was chosen for the `c3` specifically was `v0.REVISION`:
> ECO | Revision (Major.Minor)
> -----------------------------
> ECO1 | v0.1
> ECO2 | v0.2
> ECO3 | v0.3
> ECO4 | v0.4
[esp32c3 revisions]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/system/chip_revision.html#revisions
* refactor+docs: move & reword esp32c3 specific err
This change rewords the error message from "revision 3" to "revision 3
(v0.3)" in an effort to clarify the mapping between hardware revisions
and major/minor version numbers.
Additionally, it moves the esp32c3-specific error closer to the actual
version check to make it easier to keep both in sync.
* chore: remove unused import
Previously, `cargo check --all-targets` reported this import as unused.
Since it's just `const u16`, the import is probably side-effect free and
indeed safe to remove.
The problem with `write_bin` is that `board_info`, that was used instead of `print_board_info`, tries to open a new connection to the serial port and because a connection is made at the start of `write_bin`, when `board_info` gets called, it fails because the port is already being used
* Allow bin and csv partition tables for `cargo-espflash`, clean up errors
* Derive `EnumString` for `Chip` instead of manually implementing `FromStr`
* Organize, simplify, and generally improve the errors in `espflash`
* Update dependencies to their latest versions
* Derive `clap::ValueEnum` instead of using a macro
* Simplify flash config enums, make them more consistent
* Fix a bunch of clippy warnings