-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Issues writing external flash chip with esptool. (ESPTOOL-962) #1034
Comments
Update: Have also tried it with --no-compress with the same results: $ esptool --port COM10 --baud 9600 write_flash 0x0000 write.bin --no-compress --spi-connection 5,4,6,26,7 --flash_mode dout --flash_freq 12m A fatal error occurred: MD5 of file does not match data in flash! |
With a little more testing it looks like maybe flash_mode and flash_freq are not taking affect. The amount of time and the kbits/s with and without the options are too close. I would expect the run with --flash_mode dout --flash_freq 12m to take much more time, but both are taking around 4.3 seconds. Here are the results: Without flash_mode and flash_freq: A fatal error occurred: MD5 of file does not match data in flash!` With flash_mode and flash_freq: A fatal error occurred: MD5 of file does not match data in flash!` |
Hi @jackgassett interesting usecase you have here. We will take a look at it but I am not really sure if this will be possible. I took a quick look and noticed that you are right, Warning: Image file at 0x0 doesn't look like an image file, so not changing any flash settings. Here is the line that checks if the image is correct. There are some other checks that image file needs to pass to be able to change these parameters. You can try to install esptool in editable mode ( |
Operating System
Windows 10
Esptool Version
esptool.py v4.8.1
Python Version
Python 3.12.6
Chip Description
ESP32S3
Device Description
Esp32S3 Supermini attached to a Tang Primer 20K dev board with the SPI Flash pins routed to external pins, via verilog, which are connected to gpio pins on esp32s3 board.
Hardware Configuration
Only ground and the 4 spi pins MOSI, MISO, SCLK, and CS are connected from the FPGA to the Esp32S3.
How is Esptool Run
VSCODE IDE
Full Esptool Command Line that Was Run
esptool --port COM10 --baud 9600 write_flash 0x0000 write.bin --spi-connection 5,4,6,26,7 --flash_mode dout --flash_freq 12m
Esptool Output
More Information
We are currently exploring the option of using an esp32s3 to replace the traditional FT2232 devices used with FPGAs to program a bitstream to the SPI Flash of the FPGA.
We noticed the option in esptool to change the SPI pins to external SPI pins. This seems like a very elegant way to be able to program both the ESP32 and the FPGA using the same tool.
We have routed the SPI Flash pins of the FPGA to GPIO pins which are connected to the GPIO pins of the ESP32. We are getting reliable reads and erases with this configuration, but unfortunately writes are not working. Every attempt to write gets the first couple of bytes correct but then there will be sections of incorrect data with sections of correct data...
We have tried to lower the frequency and use both dio and dout modes. I'm beginning to suspect that maybe the flash mode is not actually changing to dio or dout when gpio pins are specified with --spi-connection 5,4,6,26,7.
We have also tried multiple different pin locations with the same results.
Any ideas or help is greatly appreciated.
Other Steps to Reproduce
No response
I Have Read the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: