-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
REGRESSION: ESP32-S3-DevKitC-1-N8R8 reboot cycle under 2.0.4, partially worked in 2.0.3 #6980
Comments
The bootloader boots in QIO mode. This is not supported. The bootloader has to boot in DIO mode. The started application firmware switches to the needed flash mode (QIO). |
Mhh the flash command is not perfect |
When you say that QIO mode is not supported, do you mean, not supported for any ESP32-S3 board? Or not supported specifically for the ESP32-S3-DevKitC-1-N8R8 ? If the latter, what in the output gives away that the issue is a DIO/QIO mismatch?
The file I am examining for how Arduino IDE is supposed to assign the bootloader is: ~/.arduino15/packages/esp32/hardware/esp32/2.0.4/boards.txt . Here, from context, I deduce that the default bootloader for the |
My experiment is to explicitly flash just the bootloader from the following files (with sha1sum):
The command I use to flash the files is: What I expected to happen is that the bootloaders with What actually happened is that BOTH the
Again, if I flash the 2.0.3
So, as far as I understand, there is something wrong with the 2.0.4 bootloaders for ESP32-S3 that, at least on my particular board, make them attempt to boot in QIO mode regardless of the selected bootloader, and (if the particular board does not support booting in QIO mode) causes a reboot cycle. This is confirmed when firing up Arduino IDE and then locating the temporary build directory under /tmp/arduino_build_329921/ (for my example session). The file |
The 1stage bootloader can not start in flash mode qio! It has to start in mode dio when later the second stage boot loader switches to mode qio. |
The sha checksum is invalid since esptool patches the magic bytes in the firmware regarding the settings choosen/needed. Described here |
My use of sha1sum is merely to document the chosen bootloader file in case there was any doubt on which bootloader was actually used. If @Jason2866 Could you please suggest which bootloader and/or program argument should I be using? |
I am assuming the second-stage bootloader is the file I am picking from the ~/.arduino15/packages/esp32/hardware/esp32/2.0.4/tools/sdk/esp32s3/bin/ directory. Does the reboot cycle give any hints on whether the second-stage bootloader has finished executing and is attempting to hand off control to some successfully loaded portion of the application binary? As opposed of failing to read the app binary at all? |
No, you do not see (afaik) when 2nd stage bootloader kicks in. BUT if you see QIO in this early stage of the boot process it is from 1st stage bootloader and this is wrong. |
When I checked an hexdump of the bootloaders across Arduino-ESP32 versions, I found the following difference in the headers: esp32-alternatives/2.0.3/hardware/esp32/2.0.3/tools/sdk/esp32s3/bin/bootloader_dio_80m.bin
esp32-alternatives/2.0.3/hardware/esp32/2.0.3/tools/sdk/esp32s3/bin/bootloader_qio_80m.bin
esp32-alternatives/2.0.4/hardware/esp32/2.0.4/tools/sdk/esp32s3/bin/bootloader_dio_80m.bin
esp32-alternatives/2.0.4/hardware/esp32/2.0.4/tools/sdk/esp32s3/bin/bootloader_qio_80m.bin
The relevant difference is: the 2.0.3 versions start with Soooo... my guess is now that |
Also, I found this:
The |
I have just checked, that if I flash the 2.0.4 bootloader using the 3.3.2-dev version, it works correctly:
The output, however, is a bit different:
So, why does the 2.0.4 installation fetch an old version and ends up using that one, when a newer version is available elsewhere? |
Just in case, I checked that my Arduino IDE contains only the URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json for ESP32 tool support, as indicated by the documentation, then re-downloaded 2.0.4, and checked the esptool.py files. They are again, identical to my previous installation. |
While re-downloading the Arduino-ESP32, I noticed in
There is an For now, my workaround to this situation is to move |
Well done issue tracking and finding a solution! So i know why i had to adjust my factory firmware generation. With 2.0.3 default values where set. With 2.0.4 there are none. |
For anyone coming across this issue while using PlatformIO / ESP-IDF, I was able to resolve it by locking esptool to v3.3:
Hopefully this will save others some headache. |
@ztaylor54 No workarounds needed anymore. Using latest Platformio platform espressif32 solved all this issues. |
I'm having the same issue, could someone point me to where I can find instruction on how to fix for using Arduino IDE with the ESP32-S3DEVKITC-1? Also, I'm a newb at this. Thank you in advance. |
What ESP32-S3DEVKITC-1 exactly do you have? Flash and PSRAM size and type (OPI or QIO)? |
Hello,
I have this model:
ESP32-S3-DevKitC-1 - ESP32-S3-WROOM-2 - 32MB Flash 8MB PSRAM
I read through your advise for the others and changed the flash mode to
DIO, now it's without errors but just blank on the serial monitor. I
couldn't even flash Hello World.
I received this MCU the other day brand new, plugged it in and saw the RGB
blinking, so looked fine. But as soon as I tried to upload an example
sketch, it started to do the reboot thing indefinitely. Something about
core dump...memory corrupted....
Please advise if I should do a factory reset. If so how?
Thank you.
…On Wed, Feb 8, 2023, 17:15 Jason2866 ***@***.***> wrote:
What ESP32-S3DEVKITC-1 exactly do you have? Flash and PSRAM size and type
(OPI or QIO)?
—
Reply to this email directly, view it on GitHub
<#6980 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4Y3ATWFQ5SXJIVV7QXSUPTWWQLGLANCNFSM53MFV7DA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I also changed the partition scheme to 8M with spiffs (I don't know what
this is) so now it seems to upload the RGB sketch, but nothing happened.
Here is what the monitor shows:
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x0 (DOWNLOAD(USB/UART0))
Saved PC:0x40041a76
waiting for download
Please help.
…On Wed, Feb 8, 2023 at 5:39 PM Marc Ricoh ***@***.***> wrote:
Hello,
I have this model:
ESP32-S3-DevKitC-1 - ESP32-S3-WROOM-2 - 32MB Flash 8MB PSRAM
I read through your advise for the others and changed the flash mode to
DIO, now it's without errors but just blank on the serial monitor. I
couldn't even flash Hello World.
I received this MCU the other day brand new, plugged it in and saw the RGB
blinking, so looked fine. But as soon as I tried to upload an example
sketch, it started to do the reboot thing indefinitely. Something about
core dump...memory corrupted....
Please advise if I should do a factory reset. If so how?
Thank you.
On Wed, Feb 8, 2023, 17:15 Jason2866 ***@***.***> wrote:
> What ESP32-S3DEVKITC-1 exactly do you have? Flash and PSRAM size and type
> (OPI or QIO)?
>
> —
> Reply to this email directly, view it on GitHub
> <#6980 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A4Y3ATWFQ5SXJIVV7QXSUPTWWQLGLANCNFSM53MFV7DA>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
I have exactly the same issue. If its of help I noticed that I can upload code from ESP-IDF examples[hello serial] with platformio. So the board is alive and well. I could not get it to work with arduino IDE. the settings you mentioned in adafruit thread did not work for me either. ESP32-S3DEVKITC-1-N32R8V (32MB): I get this: ESP-ROM:esp32s3-20210327 I am looking for help as well. Thanks |
For OPI flash you have to set boot flash mode to |
Board
ESP32-S3
Device Description
ESP32-S3-DevKitC-1-N8R8 as described in https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html#ordering-information
Hardware Configuration
Default "official" development board, 8MB PSRAM, 8MB Flash
Version
latest development Release Candidate (RC-X)
IDE Name
Arduino IDE
Operating System
Linux, Fedora 36 x86_64
Flash frequency
80Mhz
PSRAM enabled
yes
Upload speed
921600
Description
The board is a ESP32-S3-DevKitC-1-N8R8 from Espressif. This board is supposed to have: 8MB SPI RAM, 8MB flash storage. The latter is supposedly confirmed if I run esptool.py with the --flash-size detect option:
Under Arduino-ESP32 v2.0.3, if I choose
Flash Size: "4MB (32 Mb)"
andPartition Scheme: "Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)"
, the sketch can boot correctly when uploaded. With same Arduino-ESP32 version, if I chooseFlash Size: "8MB (64 Mb)"
BUT keep the 4MB partition scheme, it still works correctly. However, if I then keep the 8MB flash size and choosePartition Scheme: "8M Flash (3MB APP/1.5MB FAT)"
, the board enters a reboot loop:With Arduino-ESP32 2.0.4, the situation is worse. No matter what combination of flash size and partition I choose, I get the reboot loop. Of course, I do not test a 4MB flash size with an 8MB partitioning.
HOWEVER... if I flash the 2.0.4 with the 4MB partitioning and either the 4MB or 8MB flash size, and I then carefully flash the 2.0.3 bootloader at the correct address, the board is then able to boot correctly:
This points me at the 2.0.4 bootloader as the one containing the reboot bug.
Sketch
Debug Message
Other Steps to Reproduce
I have found #6803 while searching for similar bugs. The comments make me think some of the commenters are suffering the same symptoms as I do. For example, #6803 (comment). However, I really am careful of not attempting a 8MB partitioning on a 4MB configuration, and this does not explain the reboot loop with 4MB flash/4MB partitioning anyway. As I am not using PlatformIO, the comments suggesting board definition fixes do not appear to be relevant.
From this comment: #6803 (comment) it seems that at least one other has identified a bootloader regression for ESP32-S3.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: