Closed Janrupf closed 12 months ago
I'm more or less clueless what is happening, but here are my observations so far:
esptool.py
has no problems writing the file with --no-stub
espflash
source code for that)0x06
, which helpfully states "Failed to act on received message" hereesptool.py
does differently from espflash
in that regard, they seem to more or less issue the same commandsAlright, I think I figured it out, espflash
does not send the SpiSetParams
command, I'll hopefully will get a PR ready soon.
I've encountered similar problem during an attempt to flash 4 MB binary on S3-BOX calling flasher.write_bin_to_flash
method. The big binary failed with:
Flash error: RomError(RomError { command: FlashDeflateBegin, kind: Other })
I was able to flash smaller file around 1 MB, but it failed with anything bigger than ~2 MB
Alright, I think I figured it out,
espflash
does not send theSpiSetParams
command, I'll hopefully will get a PR ready soon.
Hello @Janrupf! I was about to take a look at this issue, did you have a chance to look into it?
Seems like @georgik error is different from the original error of the issue. @georgik issue also happens with big binaries, e.g: spooky-maze-esp32-s3-box.bin
and it's the following error:
❯ espflash write-bin 0x0 spooky-maze-esp32-s3-box.bin
[2023-10-06T10:44:53Z INFO ] Serial port: '/dev/ttyACM0'
[2023-10-06T10:44:53Z INFO ] Connecting...
[2023-10-06T10:44:54Z INFO ] Using flash stub
[2023-10-06T10:44:54Z WARN ] Setting baud rate higher than 115,200 can cause issues
Chip type: esp32s3 (revision v0.1)
Crystal frequency: 40MHz
Flash size: 16MB
Features: WiFi, BLE
MAC address: 7c:df:a1:e1:c0:c4
Error: espflash::timeout
× Error while connecting to device
╰─▶ Timeout while running FlashDeflateData command
Increasing the default timeout seems to fix this issue, will investigate a better solution
Edit: This issue is more related to https://github.com/esp-rs/espflash/issues/436
This should now be fixed with #489, if anyone reencounters the issue, feel free to reopen it
This is probably the same as #195, but I'm not 100% sure.
Writing large binaries to the flash fails when not using the stub.
Example invocation:
I'm trying to flash without the stub, since I have flash encryption in development mode enabled (so I need the ROM bootloader to transparently encrypt while I'm flashing).
The ESP32 I'm using has 16MB of flash, but I can also reproduce the problem if I reduce the
dd
size to2M
.