780 Commits

Author SHA1 Message Date
Jesse Braham
12a177a612
Version 4.0.0 (#916) v4.0.0 2025-07-01 13:22:40 +00:00
Scott Mabin
5360e78c60
fix SPI detection on s3 by using the right base address (#917) 2025-07-01 11:08:09 +00:00
Jesse Braham
c35728a790
Apply relevant Rust API guidelines (#915)
* Derive more traits on public types in `image_format` module

* Don't leak `PartitionTable` type in public API

* Derive more traits on public types in `command` module

* fixups

* impl Hash for things

* fmt

* wording consistency

* feat: Udpate docstrings and derives

* feat: Implement C-CONV

* Derive more traits on public types in `flasher` module

* docs: Add missing module documentation

* docs: Udpate changelog

* docs: Fix changelog

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
Co-authored-by: Sergio Gasquez <sergio.gasquez@gmail.com>
2025-07-01 08:35:32 +00:00
Jesse Braham
de3bbdc649
Document all public types (#909)
* Escape square brackets in efuse field doc comments

* Reduce visibility of non-public error types

* Deny missing documentation in library code

* Document all public types

* Fix clippy warnings
2025-06-30 08:32:16 +00:00
nullstalgia
a43be2e6ec
Indicate in CLI when a partition was skipped or being verified, fix incorrect chunk size being shown. (#908)
* Indicate in CLI when a partition was skipped or being verified

* Fix target address alignment, and just append to last msg.

* Modify changelog with logs of changes
2025-06-30 07:55:43 +00:00
Sergio Gasquez Arcos
2e3f3c362c
Move non-interactive flag to connect args (#906)
* fix: Move non-interactive flag to connect args

* feat: Update changelog

* fix: Update cargo-espflash

* feat: Filter "dev/tty.*" ports in macos
2025-06-27 14:03:30 +00:00
Scott Mabin
c50eb97ead
Show progress when skipping and verifying (#904)
* Show progress when skipping and verifying

The progress callbacks get initialized and updated even if we skip a
segment. For verification, we add an extra step to the progress which is
updated once verification is complete.

* Make callbacks compulsory, add empty impl convience struct

* changelog

* fixups

* Add skip bool to finish to determine whether the segment was finished via skip or real work was done

* more changelog

* Fix new clippy lints introduced in 1.88

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2025-06-27 07:53:04 +00:00
Juraj Sadel
73c613abd0
Avoid leaking inner error types vol.3 (#907) 2025-06-26 11:25:42 +00:00
Juraj Sadel
745bef6310
Avoid leaking inner error types vol.2 (#905)
* Avoid leaking inner error types vol.2

* remove redundant impl

* Update espflash/src/error.rs

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>

---------

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2025-06-26 07:46:37 +00:00
Jesse Braham
188cd4e000
Make eFuse field definitions public, minor public API cleanup (#903)
* Make efuse field definitions public

* Remove unnecessary argument and simplify return type for  `flash_write_size` and `max_ram_block_size` functions

* Update `CHANGELOG.md`

* Make eFuse field definitions public
2025-06-25 11:21:57 +00:00
Scott Mabin
f31f75e92e
Address library feedback (#901)
* use stored skip/verify params

* move command structs out of connection module

* changelog

* use scaling timeout for md5 check
2025-06-25 10:45:47 +00:00
Juraj Sadel
0a983fa240
Check app_desc _only_ for esp-hal projects (#892)
* App desc check only for esp-hal projects

* clippy

* comment why it is esp-hal specific

* Check if the project is esp-idf based and if it has an app desc section present

* clippy

* reviews

* fmt

* update link
2025-06-24 13:06:10 +00:00
Jesse Braham
29371c32f7
Allow skipping the update checks using an environment variable (#900)
* Allow skipping the update checks using an environment variable

* Update `CHANGELOG.md`
2025-06-24 07:53:09 +00:00
Sergio Gasquez Arcos
f12ecf363d
Improve docs (#899)
* feat: Make try_from private

* docs: Improve docs

* feat: Make erase_parts private

* docs: Improve docs

* docs: Fix typos
2025-06-20 14:08:23 +00:00
Dániel Buga
61e5032d92
Exclude test data from release (#897) 2025-06-20 10:55:13 +00:00
Dániel Buga
247460a46a
Remove a bunch of unnecessary Box<dyn> (#898) 2025-06-20 10:34:45 +00:00
Dániel Buga
1e25b4aed8
Don't trip up on non-code sections (#896)
* Don't trip up on non-code sections

* Add test
2025-06-20 09:12:35 +00:00
Scott Mabin
8e7f120ba8
make reset operations public so Connection::new can be called. (#895) 2025-06-20 07:11:59 +00:00
Scott Mabin
a0752e6e39
Remove chip target files (#891)
* remove the efuse trait

* remove the target trait

* remove the target structs, use Chip for everything

* move some things around, make FlashTarget public

* rename idf image format, don't rexport things we don't need to

* fix compilation by removing erroneous feature gate

* Add `MissingPartition` and `MissingPartitionTable` to `Error`

* Address review comments

* CHANGELOG

* rename targets module to target
2025-06-19 14:23:56 +00:00
Sergio Gasquez Arcos
d532c03eb8
Update deps and adapt code (#893)
* build: Update deps and adapt code

* docs: Update changelog

* feat: Review comments
2025-06-19 11:25:46 +00:00
Sergio Gasquez Arcos
2c56b23fdf
Pin addr2line@0.22 (#889)
* revert: Pin addr2line@0.22

* test: Add backtrace tests
2025-06-18 14:00:09 +00:00
Juraj Sadel
5c0c6f4479
Box currently leaking errors (#888) 2025-06-18 09:58:18 +00:00
Juraj Sadel
8127cd9c7d
fix warnings and make CI fail on warnings (#887) 2025-06-17 12:48:06 +00:00
Sergio Gasquez Arcos
99a9e6b835
Fix baudrate (#885)
* fix: Only change baud if neccesary

* feat: Only change baudrate if required

* docs: Udpate changelog

* test: Add high baudrate test

* feat: Increase timeout
2025-06-17 10:00:49 +00:00
Sergio Gasquez Arcos
fa8932e8c8
Migrate old config (#883)
* feat: Migrate old config

* docs: Udpate changelog

* feat: Update espflash.toml config
2025-06-17 08:31:51 +00:00
Scott Mabin
dd0b18d3c6
Move construction of Connection outside of flasher (#882)
* Move construction of Connection outside of flasher

* Move chip detect to Connection

* Move more relevant things to Connection

* Move more relevant things to Connection

* use baud throughout the codebase

* changelog
2025-06-13 10:08:15 +00:00
Sergio Gasquez Arcos
56a23a7072
Refactor image format (#877)
* Begin making it possible to add additional image formats in the future

* Add a method to return app image metadata, fix(?) size printing code

* Fix clippy warning

* feat: Remove Esp32Params

* feat: Esp-idf only stuff

* feat: Initial CLI changes

* feat: Avoid code duplication

* feat: Remove the option to pass partition name to write bin

* feat: Allow image format args in configuration

* feat: Reduce IdfBootloaderFormat arguments

* feat: Remove flash_image and rely on ImageFormat

* tests: Remove write-bin to a partition name test

* style: Rename methods

* feat: Check erase-parts arguments

* docs: Remove todo

* feat: Simplify parse_partition_table

* feat: Improve docstrings, rename bootloader method

* feat: Update visivility and create a getter for partition-table

* docs: Add changelog entries

* docs: Remove esp-idf only annotations

* feat: Implement Chip::default_crystal_frequency

* docs: Remove unnecesary todo

* docs: Add docstrings for new Chip methods

* docs: Add missing docstrings

* style: Fix rustfmt

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2025-06-12 12:04:11 +00:00
Juraj Sadel
ce0ad9d1f5
Minor docs improvement (#878)
* Minor docs improvement

* Add a forgotten one

* add periods
2025-06-12 10:41:12 +00:00
Juraj Sadel
18a4e388a8
Check if bootloader has app descriptor (#872)
* Check if bootloader has app descriptor

* changelog

* refactor

* another refactor

* Update espflash/src/image_format/esp_idf.rs

Co-authored-by: Scott Mabin <scott@mabez.dev>

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2025-06-11 10:37:43 +00:00
Björn Quentin
b8eb162539
Fix mac address efuse (#871)
* Fix mac-address trickery

* efuse update using esptool commit 90e3770c6716a2031d77d830c3455d40db648b0c
2025-05-30 15:12:49 +00:00
Kirill Mikhailov
4006bd01e8
get sdm detection back (#869) 2025-05-28 13:04:39 +00:00
Sergio Gasquez Arcos
818a730bca
Add serial ports config file (#777)
* feat: Add serial ports config file

* fix: Remove unused comment

Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>

* docs: Update readme instructions

* docs: Update changelog

* docs: Fix typo

Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>

* feat: Use a single config struct

* feat: Simplify find_config_path methods

* docs: Update config documentation

* fix: Use a single config struct in cargo-espflash

* feat: Simplify save_with method

* docs: Improve docstrings

* fix: Clippy lint

* docs: Add a note about why there are 2 config files

---------

Co-authored-by: Juraj Sadel <jurajsadel@gmail.com>
2025-05-27 08:39:59 +00:00
Dániel Buga
628947d5c7
Impl missing reset after commands (#867) 2025-05-26 17:36:18 +00:00
Jesse Braham
47b661db1d
Add support for the ESP32-C5 (#863)
* Generate eFuse field definitions for ESP32-C5

* Add bootloader and flasher stub for ESP32-C5

* Add initial support for the ESP32-C5

* Mention ESP32-C5 in various READMEs

* Update `CHANGELOG.md`

* Small fixes
2025-05-22 12:39:52 +00:00
Juraj Sadel
d76820f30a
Update bootloaders with IDF release/v5.4 ones (#857)
* Update bootloaders with IDF release/v5.4 ones

* changelog

* rebuilt data elfs with esp-bootloader-esp-idf included

* Add a README with bootlader's details

* reviews

* rework bootloaders README
2025-05-07 13:06:39 +00:00
Jesse Braham
52df8164d5 Add a note regarding the devkit support policy to package-level README.md (#855) 2025-04-23 16:02:37 +02:00
Jesse Braham
64d001a776
Correct bit start offset for MAC1 field (#852) 2025-04-22 11:56:41 +00:00
Jesse Braham
04b7ebea5d
Implement new API for reading eFuse values (#847)
* Create the `xtask` package

* Implement and xtask subcommand to generate eFuse field definitions from YAML files

* Generate eFuse field definitions

* Update `target` module to provide new eFuse reading API

* All non-problematic chips working with new eFuse API

* ESP32 is now working

* ESP32-S2 is now (mostly) working

* Very necessary change :)

* Clean up the mess I made of the imports

* Address clippy lints

* Update `CHANGELOG.md`

* Perform fewer raw eFuse field reads for ESP32

* Address review comment regarding `xtask` package

* Verify that `xtask` package builds in CI

* Fix block offset calculation
2025-04-22 07:44:25 +00:00
Sergio Gasquez Arcos
d4672de6d5
fix: Remove openssl note (#848) 2025-04-17 12:51:10 +00:00
Be
4d56a44b92
Flasher: document baud rate requirement (#845)
* Flasher: document baud rate requirement

* Fix formatting

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2025-04-17 08:12:08 +00:00
Jesse Braham
eaef938661
Fix CI error by installing newly required dependency (#846) 2025-04-17 07:48:19 +00:00
Jesse Braham
370c70c544
Remove the dependency on cargo from the cargo-espflash package (#841) 2025-04-16 11:21:42 +00:00
Jesse Braham
5074e8bacc
Update esp-idf-part dependency (#844) 2025-04-16 10:55:16 +00:00
Jesse Braham
5362c0f30b
Update to Rust 2024 edition (#843)
* Update to edition 2024

* Format using new edition rules

* Fix new clippy error

* Update `CHANGELOG.md`
2025-04-15 08:42:42 +00:00
Sergio Gasquez Arcos
5b1027a9ca
Check monitor args (#842)
* feat: Check monitor args

* docs: Udpate changelog

* style: Fix format
2025-04-10 13:49:43 +00:00
Kirill Mikhailov
fd795df7b5
Add board-info command support in Secure Download Mode (#838)
* Cut off the write_bin part from original #832

* Changelog entry

* Akela missed...

* Dumb

* Address reviews
2025-04-10 09:50:31 +00:00
Dániel Buga
37f28f6ba0
Fix segment merging (#839) 2025-04-09 12:36:11 +00:00
Dániel Buga
79bbd67fa1
Fix MMU page size handling (#835)
* Extract IROM_ALIGN uses

* Add possible MMU page sizes

* Read MMU page size from app descriptor, add --mmu-page-size

* Validate final page size

* Fix PR number in changelog

* Clippy

* Add test

* Undo Segment changes
2025-04-08 09:45:53 +00:00
Dániel Buga
e6af2af321
Align segment lengths after merging (#831)
* Align segment length after merging

* Explain the need for pad_alignment
2025-04-04 13:33:20 +00:00
Dániel Buga
8137c434d4
Allow flashing binary to a named partition (#828)
* Allow flashing binary to a named partition

* Test
2025-04-04 12:58:02 +00:00