-
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
Failure to upload filesystem image to ESP32-S3 (ESPTOOL-538) #795
Comments
@CoryCharlton I'm sorry but I cannot download the trace. It times out for me. Could you please just attach to the GH issue? I wonder if adding the |
@dobairoland Here's the trace: Here's the output and trace from replacing |
I am also seeing this error with an Unexpected Maker ProS3 board using PlatformIO 2.5.5 (and platform_packages = tool-esptoolpy@~1.40300.0) when executing the "Upload Filesystem Image" task:
In Arduino IDE 1.8.19 using arduino-esp32fs-plugin 2.0.7 the result is:
However, in PlatformIO, when I "Erase Flash", add "board_build.partitions = default.csv" to platformio.ini configuration, and execute "Upload Filesystem Image" it seems to succeed:
|
Interesting, using default.csv did seem to work although it doesn't use the entire 16MB flash so I don't have enough room for my files. Here's the partition layouts I was using: default_16MB.csv * My board uses this by default And for comparison the default.csv that works: |
Looks like the issue is possibly related to the default 16MB partition tables. I used the following custom partition table and it worked fine:
|
Thanks @CoryCharlton for providing a working partition table example and for helping to solve this problem! Cheers, |
So this might still be an issue on the esptool side (based on this comment). The specific issue appears to be related to the partition table completely filling up the 16MB flash. For instance I broke the working partition table mentioned here by extending the spiffs partition to ~12MB in order to completely use all available space.
But I can make it work again by shrinking the spiffs partition by 1KB:
|
@CoryCharlton @SuGlider I don't think this is an issue with esptool nor Arduino. If you take a look at the trace then you can see at the end that some serial data left in the buffer:
Honestly, I don't know what esptool could do about this. There is not enough information to print something more useful. I'll try to ask around..... |
It was pointed out to me that this is a duplicate of #745. |
I'm able to write 16kB to the end of the flash region on an ESP32-S3 with 8MB flash as opposed to 16MB reported here.
|
I looked at this a bit and I think the issue is in the flasher_stub code. The routines that read_flash and write_flash change the spi method when above the first 16M flash. I think that this is happening 1 byte early. Meaning in the first 16M of flash. When I change the lines of code that check I am able to read and write to then end.
|
can I get you to make me a partition table like the one you found worked for you? i have no idea what I am doing, but just need a 2mb app 12 mb fatfs or spiffs or whatever so I can get a project running on my ProS3 by UM Thank You! |
Here's a partition table with room for a 4MB app and a ~12MB SPIFFS partition: partitions.csv Place the
Complete
Then use the PlatformIO commands to perform the following steps: I'm on the Unexpected Maker Discord as Roland Deschain if you run in to any issues. |
@skieast hello there, I looked for those lines and I found them with .c extension, is that correct? I mean I changed those values but I got the same response, should I recompile esptool? |
You will need to recompile the flasher_stub routines that are in the flasher_stub folder. That is C code, the instructions are in the folder. Consists of downloading the ESP8266 compiler and sdk and the ESP32 idf. I don't think its really worth it at this time because you are only limited to not being able to read/write the last byte of 16M flash. From README.md
|
Well I couldnt get it to compile but!! @CoryCharlton sample partition definately worked for me |
@beckmx You can try my fork https://github.com/Jason2866/esptool |
* Enabled PSRAM memory (+8MB usable RAM) - This setting is crucial: board_build.arduino.memory_type = qio_opi * Use 16MB flash partition scheme - A custom one with 16MB-1Byte size is used to workaround a tool bug when trying to upload full 16MB see espressif/esptool#795 (comment) - Add PSRAM to info web page
I do hope this gets reviewed, validate, and merged ... because I have a few ESP32-S3 with 32MB of flash, and I've had to artificially limit use of those to <16MB. |
* fix(setup): Use latest reedsolo package which can be installed with Python3.10 and Cython Closes espressif#711 * feat(ci): Publish development releases with custom pipeline * fix(ci): The development release job should not run by default Gitlab rules:if adds the job if any of the rules are true. * fix(ci): Merge two "ci" directories and build_tools into one * fix(secure download mode): Fix SDM detection on S2/S3 * fix(secure download mode): Reconnect if ROM refuses to respond Closes espressif#813 * fix(flasher_stub): Correct boundaries for SPIWrite4B and SPIRead4B SPIWrite4B and SPIRead4B functions are required for flash sizes bigger than 16MB. This fix corrects the boundaries so SPIWrite and SPIRead would be used for the whole 16MB area. The octal flash support for 32 MB chips (espressif#795) will be added in a follow-up commit. Closes espressif#745 Co-authored-by: Roland Dobai <roland@espressif.com> Co-authored-by: radim.karnis <radim.karnis@espressif.com>
* Tasmota changes * stubs updated * S3 16MB fix (#4) * fix(setup): Use latest reedsolo package which can be installed with Python3.10 and Cython Closes espressif#711 * feat(ci): Publish development releases with custom pipeline * fix(ci): The development release job should not run by default Gitlab rules:if adds the job if any of the rules are true. * fix(ci): Merge two "ci" directories and build_tools into one * fix(secure download mode): Fix SDM detection on S2/S3 * fix(secure download mode): Reconnect if ROM refuses to respond Closes espressif#813 * fix(flasher_stub): Correct boundaries for SPIWrite4B and SPIRead4B SPIWrite4B and SPIRead4B functions are required for flash sizes bigger than 16MB. This fix corrects the boundaries so SPIWrite and SPIRead would be used for the whole 16MB area. The octal flash support for 32 MB chips (espressif#795) will be added in a follow-up commit. Closes espressif#745 Co-authored-by: Roland Dobai <roland@espressif.com> Co-authored-by: radim.karnis <radim.karnis@espressif.com> * Update stub_flasher_32s3beta2.json * Update build_esptool.yml * Update build_esptool.yml * stubs updated Co-authored-by: Github BUILD <github-actions@github.com> Co-authored-by: Roland Dobai <roland@espressif.com> Co-authored-by: radim.karnis <radim.karnis@espressif.com>
* S3 16MB fix (#4) * fix(setup): Use latest reedsolo package which can be installed with Python3.10 and Cython Closes espressif#711 * feat(ci): Publish development releases with custom pipeline * fix(ci): The development release job should not run by default Gitlab rules:if adds the job if any of the rules are true. * fix(ci): Merge two "ci" directories and build_tools into one * fix(secure download mode): Fix SDM detection on S2/S3 * fix(secure download mode): Reconnect if ROM refuses to respond Closes espressif#813 * fix(flasher_stub): Correct boundaries for SPIWrite4B and SPIRead4B SPIWrite4B and SPIRead4B functions are required for flash sizes bigger than 16MB. This fix corrects the boundaries so SPIWrite and SPIRead would be used for the whole 16MB area. The octal flash support for 32 MB chips (espressif#795) will be added in a follow-up commit. Closes espressif#745 Co-authored-by: Roland Dobai <roland@espressif.com> Co-authored-by: radim.karnis <radim.karnis@espressif.com> * Update stub_flasher_32s3beta2.json * Update build_esptool.yml * Update build_esptool.yml * stubs updated Co-authored-by: Github BUILD <github-actions@github.com> Co-authored-by: Roland Dobai <roland@espressif.com> Co-authored-by: radim.karnis <radim.karnis@espressif.com> * stubs updated * stubs updated Co-authored-by: Github BUILD <github-actions@github.com> Co-authored-by: Roland Dobai <roland@espressif.com> Co-authored-by: radim.karnis <radim.karnis@espressif.com>
Confirming that this commit resolves my issue with 16M flash. I was going to close this issue but it looks like you're keeping it open for an issue with 32M flashes that is not the same as my original issue. Feel free to close this if I am mistaken. |
SPIWrite4B and SPIRead4B functions are required for flash sizes bigger than 16MB. This fix corrects the boundaries so SPIWrite and SPIRead would be used for the whole 16MB area. The octal flash support for 32 MB chips (espressif/esptool#795) will be added in a follow-up commit. Closes espressif/esptool#745
Octal flash support tested up to 32MB. Quad flash support is limited to 16MB at this moment. Closes espressif/esptool#795 Closes espressif/esptool#745 The next release will solve espressif/esp-idf#10323 as well.
Operating System
Windows 10
Esptool Version
v4.2.1 and v4.3
Python Version
Python 3.9.10
Chip Description
ESP32-S3
Device Description
Unexpected Maker FeatherS3 and TinyS3 (another user also reported the same issue with the ProS3): https://esp32s3.com/index.html#esp32s3_info
Hardware Configuration
Nothing is connected
How is Esptool Run
Windows terminal, PlatformIO (VS Code)
Full Esptool Command Line that Was Run
C:\Users\ccharlton\Downloads\esptool-v4.3-win64\esptool-v4.3-win64\esptool.exe --chip esp32s3 --port "COM10" --baud 460800 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 16MB 13172736 .pio\build\debug\spiffs.bin
Esptool Output
More Information
No response
Other Steps to Reproduce
No response
I Have Read the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: