-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
V2 to V3 boot error (571) esp_core #9984
Comments
I turned core debug level to verbose: and it shows the partition info and some additional stats: E (750) esp_core⸮f0WW�⸮e⸮+⸮�-'H⸮KW�$VW���V,W,⸮,ZY⸮-HV⸮-[Y⸮⸮
|
After much testing I have determined this is not a V3 error. I have narroed it down to something with the partition setup I think. Originally my device used spiffs and I flashed the device using esptool.exe with the following command: esptool.exe --chip esp32 --port COM7 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 bootloader_qio_80m.bin 0x8000 Main.ino.partitions.bin 0xe000 boot_app0.bin 0x10000 myapp.bin 0x3d0000 Main.spiffs.bin Now if I try to flash that with a firmware compiled with 2.0.17 using that same command line I get the core dump line but the chip continues to work. If I erase the chip and flash the same firmware with esptool.exe removing the spiffs reference then I no longer get the dump. esptool.exe --chip esp32 --port COM7 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 bootloader_qio_80m.bin 0x8000 Main.ino.partitions.bin 0xe000 boot_app0.bin 0x10000 myapp.bin I am not sure if maybe the reserved space for spiffs changed over the different revisions? Once I flash firmware with my spiffs reservation causing the crash I continue to get the crash even if you remove the reference. The chips is stuck until you do an erase. So my problem is how do I move forward. I no longer need spiffs in my project but my devices were flashed with that address reservation. The problem recreates if I try to OTA a new file to them. Appreciate any advice! :^) |
I have narrowed it down. I am still running 2.0.17 just as an example and it doesn't matter what code I have. If I flash the device with the original spiffs.bin it gives the error on startup. This spiffs file had 3 files in it. The file size on the old spiffs.bin shows 192kb or 196,608 bytes. I sort of remember back in 2020 when I created that file that it always created a 192K spiffs file. When I try to create a new spiffs file with the same 3 files I get the error: [SPIFFS] data : C:\SPYDERROBOTICSDATA\spyderrobotics\FIRMWARE\arduino\SKETCHBOOK\SPYDERWEB_12\JUNK\Main\data error adding file! SPIFFS Create Failed! If you select the 3 files in windows it shows file size to be 92.2KB (94,485 bytes). If I flash with the new spiffs file on an erased chip (doesn't matter what program) everything is fine. So in summary: I am thinking there was some difference with the partition scheme in the past which allowed that file to work and something in later revisions of the esp core that choke when trying to flash over the previous firmware. Other than the error on boot the device appears to be working but I don't know if there are other effects yet. Since I have many devices out there with this original configuration it would be nice to find a solution that can fix it via OTA. I did try flashing code that enabled spiffs and did a format. The format was successfull but it still had the core error on boot. |
Haven't read everything in detail but it does seem like a partition mismatch between what is deployed and what is built using latter versions of core 2.0.x and the newer core 3.0.x. Solution, if this is the case, is to build the new version using the partition table from what is deployed. To find that table, a couple of options:
Once you have the table in Then when the software is compiled, the build system will use that table. Caveat: Meaning, you may need to customize the old portion table to compensate, but give it a whirl and see. Docs on There are other things that might come in to play but one step at a time. |
So in thinking about this the coredump error is because the coredump partition doesn't exist. Which in itself doesn't seem to be a problem because my code still is at the correct positions in flash. The challenge I guess is how can you update a device via OTA with code written in 3.0.2 to a device that does not have a coredump partition? OTA with the main .bin file isn't going to change partition structure correct? This is why it seems I just need the ability to disable the use of coredump to flash. |
I found this config CONFIG_ESP_COREDUMP_TO_FLASH_OR_UART that has the option of None (ESP_COREDUMP_ENABLE_TO_NONE) I think this would eliminate my error but I am not sure if this is possible in the arduino core? These was also CONFIG_ESP_COREDUMP_CHECK_BOOT that shows the default as: Yes (enabled) if ESP_COREDUMP_ENABLE_TO_FLASH Maybe this check system also needs to be disabled? |
I don't believe the core dump partition is mandatory. Does the code run if you use the table without that partition? Didn't go back through everything, but what message are you seeing? If it's only a warning then no problem. |
Yes. The code works. I just get a error out the serial on boot "E (571) esp_core⸮3�յ⸮}⸮⸮⸮͡⸮��⸮ɕ⸮"յ⸮⸮"⸮х⸮�⸮⸮⸮⸮⸮2⸮⸮⸮⸮⸮⸮jR4�⸮kV�+�W��⸮,ZY⸮⸮⸮][O⸮⸮⸮&YMX⸮⸮'" Functionally I could just ignore it as the error doesn't stop the code from running. It would just be nice to clean it up and also get and explanation why it seems the spiffs allocation does not match. If I am correct on that then that should be addressed because you can't actually use 190K as shown in the description if there is only 131,072 available per the partitions file that 3.0.2 is creating. |
Board
ESP32 Dev Module
Device Description
Custom pcb
Hardware Configuration
Yes
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
115200
Description
Device that was previously programed with V2 (most likely 2.0.5) after being flashed with v 3.0.2 on the bootup serial I get
ts Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1448
load:0x40078000,len:14844
ho 0 tail 12 room 4
load:0x40080400,len:4
load:0x40080404,len:3356
entry 0x4008059c
E (571) esp_core⸮3�յ⸮}⸮⸮⸮͡⸮��⸮ɕ⸮"յ⸮⸮"⸮х⸮�⸮⸮⸮⸮⸮2⸮⸮⸮⸮⸮⸮jR4�⸮kV�+�W��⸮,ZY⸮⸮⸮][O⸮⸮⸮&YMX⸮⸮'
Everything seems to work but I do not know what is going on with this esp_core message.
What I have found is if I do a full erase on the chip first and flash with V3 the message does not appear.
Anytime I have my original program that was flashed in with esptool.exe and then try to OTA or use arduino to flash over it I get the error. This makes me think maybe its a partition issue? I am using MINIMAL SPIFFS 1.9MB app with OTA/190k SPIFFS
If I start with a simple program on V2 and then flash V3 its fine.
The original additional files (boot_app0.bin, bootloader_qio_870m.bin, main.ino.partitions.bin,main.spiffs.bin) that were used to flash in the original firmware date from 2020.
I appreciate any info on the error and if anyone knows if the partition setup for (MINIMAL SPIFFS 1.9MB app with OTA/190k SPIFFS) has changed?
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: