espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.41k stars 7.37k forks source link

Core dump flash config is corrupted! #8083

Open zekageri opened 1 year ago

zekageri commented 1 year ago

Board

ESP32-Wrover-E

Device Description

ESP32 Wrover-E, 8MB psram, 16mb flash

Hardware Configuration

Lan8720 psram i2c spi

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

Windows 11

Flash frequency

80mhz

PSRAM enabled

yes

Upload speed

115200

Description

My application worked for more than a year now. There was occasional updates but nothing serious.

I have no partition for esp_core_dump. My partition table is the default large_spiffs_16MB.csv.

My PIO ini file looks like this:

[env:esp-wrover-kit]
platform = espressif32

board       = esp-wrover-kit
framework   = arduino
board_build.filesystem = littlefs

board_build.f_cpu   = 240000000L
upload_port     = COM3
upload_speed    = 921600
monitor_speed   = 115200
monitor_filters = esp32_exception_decoder

board_upload.flash_size = 16MB
board_build.flash_mode = qio
board_build.partitions = large_spiffs_16MB.csv
board_build.f_flash    = 80000000L

build_flags =   -DBOARD_HAS_PSRAM
                -mfix-esp32-psram-cache-issue
                -mfix-esp32-psram-cache-strategy=memw
                -DCORE_DEBUG_LEVEL=0

My sketch does not contain any logic to retrive the core dump from the flash, since i don't use it.

I had the following core dump too:

esp_corf Eյ } ͡ Incorrect size of core dump image: 1601512059

My case is similart to this https://www.esp32.com/viewtopic.php?t=13899 And this https://github.com/HomeSpan/HomeSpan/discussions/490

My sketch never recovers from this and just keeps rebooting.

PLATFORM: Espressif 32 (6.1.0) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20007.0 (2.0.7) 
 - tool-esptoolpy @ 1.40500.0 (4.5.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Retrieving maximum program size .pio\build\esp-wrover-kit\firmware.elf
Checking size .pio\build\esp-wrover-kit\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  21.9% (used 71664 bytes from 327680 bytes)
Flash: [===       ]  30.6% (used 1441777 bytes from 4718592 bytes)

Sketch

Can't

Debug Message

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4008b028  PS      : 0x00060130  A0      : 0x800dc646  A1      : 0x3ffd9f40  
A2      : 0x3f91567c  A3      : 0x00000000  A4      : 0x000007d0  A5      : 0x3f91567c
A6      : 0x69756372  A7      : 0x0000007d  A8      : 0x00000000  A9      : 0x3ffd9f10  
A10     : 0x00000000  A11     : 0x3f422507  A12     : 0x000000ff  A13     : 0x0000ff00
A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x00000018  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000000  LBEG    : 0x4008b028  LEND    : 0x4008b03e  LCOUNT  : 0x0000007c

Backtrace: 0x4008b025:0x3ffd9f40 0x400dc643:0x3ffd9f50 0x400fae3d:0x3ffd9f90 0x400fe5ee:0x3ffda000 0x400fe946:0x3ffda1a0 0x400fe97b:0x3ffda1c0 0x400fea14:0x3ffda1e0

ELF file SHA256: c6c1a730c8072444

E (9145) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
Rebooting...

Other Steps to Reproduce

Can't

I have checked existing issues, online documentation and the Troubleshooting Guide

mrengineer7777 commented 1 year ago

Did you upgrade the firmware from an earlier version of arduino-esp32? I know at some point the partition defaults changed to add coredump. This can cause corruption until the chip is completely erased and re-written. I recently added partition settings to my project because of that.

zekageri commented 1 year ago

I did not. Always using the latest stable. This firmware ( which crashed) was updated like a month ago.

zekageri commented 1 year ago

I thought that core dump is not even possible in Arduino

mrengineer7777 commented 1 year ago

Apparently it's called ESP Insights. https://github.com/espressif/arduino-esp32/pull/7566/files. Added Dec 22, 2022. Release v2.0.6.

zekageri commented 1 year ago

Well. I can't find any doc how to use it under arduino. Interesting

mrengineer7777 commented 1 year ago

@zekageri How can we help?

zekageri commented 1 year ago

I wonder how my sketch got here and why it is wanted to read/write to a partition which does not exists and not configured at all, to avoid it in the future, or to be able to initialize this feature so it can not crash next time.

brightproject commented 1 month ago

It seems I have a similar problem, but it doesn't bother me yet, because the ESP32 microcontroller works as it should.

CountBobby commented 1 month ago

If you use the standard settings (ESP32-WROOM-DA Module) The Flash Frequency is set to 80Mhz - you need to change it to 40MHz and Flash size to 16Mb (or what your board has) That worked for me