Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve flash speed by skipping bootloader and partition tables when possible #479

Closed
MabezDev opened this issue Sep 20, 2023 · 3 comments · Fixed by #538
Closed

Improve flash speed by skipping bootloader and partition tables when possible #479

MabezDev opened this issue Sep 20, 2023 · 3 comments · Fixed by #538
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@MabezDev
Copy link
Member

See: esp-rs/esp-hal#803 (comment)

But essentially, we could make espflash smart enough to flash the things that have changed, which is usually just the main app.

@MabezDev MabezDev added the enhancement New feature or request label Sep 20, 2023
@MabezDev MabezDev changed the title Improve flash speed by skipping bootloader and partition tables Improve flash speed by skipping bootloader and partition tables when possible Sep 20, 2023
@bugadani
Copy link
Contributor

If it is possible to read the hash of a particular flash region, it should also be possible I believe to implement selective reflashing: for each flash block, read the hash, compare, and only reflash if differs.

Also, cc #259 as this issue is basically the meat of flash content verification.

@bjoernQ
Copy link
Contributor

bjoernQ commented Dec 21, 2023

There is ESP_FLASH_VERIFY_MD5 command ( https://github.com/espressif/esptool/blob/8538b8983e5e04ad5d6f63620d609bfa63412eb3/flasher_stub/include/stub_flasher.h#L53 )

I think it's not yet supported by the Rust esp-flasherstub but by the esp-tool stub and in ROM (not for ESP-8266)

@bjoernQ
Copy link
Contributor

bjoernQ commented Dec 21, 2023

Started to look into ESP_FLASH_VERIFY_MD5 ... as mentioned, we don't have it supported by the Rust esp-flasherstub which is not that good

Tried without a flasher stub and it needs quite a few changes to espflash internals because of the way we currently parse responses into CommandResponse (and how we currently cannot return something that is not u32)

Additionally, there are at least two different response formats for that command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants