esp-rs / espflash

Serial flasher utility for Espressif SoCs and modules based on esptool.py
Apache License 2.0
455 stars 110 forks source link

Ability to specify whether to reboot after writing bin to flash #497

Open ajmcquilkin opened 8 months ago

ajmcquilkin commented 8 months ago

Thanks for your work on the project!

I'm working with an ESP32-S3 core on a project where I need to flash three .bin files, all over 1MB, to three separate locations in memory. Currently, the write_bin_to_flash method forces the device to reboot after each method call (link), which causes a communication failure error when I try to write at the next location.

I am looking for the ability to specify that the device should only restart after the last call to write_bin_to_flash. I would assume this would require a new parameter.

SergioGasquez commented 5 months ago

Hi! I've just implemented #561, which might help here (although it might not be a full solution, I think). You could use --after no-reset or --after no-reset-no-stub to avoid the reset after every write. I'd appreciate it if you could give it a try.