-
Notifications
You must be signed in to change notification settings - Fork 7k
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
unhandled double exception ESP32-S2 IDF 5.1.2 what is the cause in a previous well running project on IDF 5.0.1? (IDFGH-11592) #12711
Comments
@ralphde I can't say exactly what the reason for the failures is. A double exception usually occurs when there is another interrupt going on already, which indicates a deeper rooted problem. Do you by chance have a reproducing example that we could try to reproduce the issue on our side? |
Have you tried flashing another board with a different device than the original ESP-Prog? I'm asking because the line |
@0xjakob yes, this is a deeper issue. To make it clear, this issue occurs BEFORE any user code (app_main) is reached. And it started happening when we migrated from 5.0.1 to 5.0.4. |
@0xjakob how can we provide our code? obviously not via here. we need an urgent solution |
@ralphde If you're OK sharing it privately without NDA, then you can send it to the email address of an Espressif engineer, which would be jakob.hasse@espressif.com for me (you can see the email address in the logs of IDF). I will also forward it to the relevant colleagues. If you can't share without NDA, then you would need to contact Espressif sales: sales@espressif.com. |
@ralphde How do you actually know there's a double exception? It seems like the log output is cropped. If that's the case, are you able to post the full log output including any panic handler messages and, ideally, backtraces? |
@0xjakob no this is all what falls out of UART0 at startup. The code lands in extensa_vectors.S line 564 _DoubleExceptionVector before restrart. That basically loops due to setting in sdkconfig. |
Issue seems to be in the cache init code, where we actually do not properly handle We'll fix this. |
it seem to be much more problems with memory management including partition handling |
any progress on this? |
It's because 0 size dcache condition is not configured well. It can be reproduced on master as well. We'll fix it on master then bring the fix to previous release versions. You may try this for now: |
OK I understood that before, however, even with 8 kb dcache I have further
issues which may be related to data chashing as well, like global variables
do not work as expected and the NVS component does as well cause panicing.
See my last issue posts, can these issue be linked to a cashing issue in
general?
Best Regards
Mit freundlicher Empfehlung
Ralph Deffke
Am Do., 4. Jan. 2024 um 05:22 Uhr schrieb Icarus113 <
***@***.***>:
… It's because 0 size dcache condition is not configured well. It can be
reproduced on master as well. We'll fix it on master then bring the fix to
previous release versions.
You may try this for now:
s2_dcache_0_size_v5.txt
<https://github.com/espressif/esp-idf/files/13826100/s2_dcache_0_size_v5.txt>
—
Reply to this email directly, view it on GitHub
<#12711 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADL5WF6QCVVK2SF5U6N5DWTYMYVA5AVCNFSM6AAAAABAEVYS6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZWGI4TCMJXGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This sounds like another issue. You may follow-up it in #12917 you posted. The crash in this issue is caused by the cache wrong configurations. This issue will be closed after the corresponding commit is synced here. Feel free to reopen and leave comments. |
Answers checklist.
IDF version.
5.0.4 and 5.1.2
Operating System used.
Windows
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
None
What is the expected behavior?
should work out of the box
What is the actual behavior?
The following start up ends in extensa_vectors.S line 564 _DoubleExceptionVector:.
Previously the code was running fine until IDF 5.0.1, stopped loading in 5.0.4 and 5.1.2
what should I look at ?
Bootloader issue:
ESP-ROM:esp32s2-rc4-20191025 Build:Oct 25 2019 rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:1 load:0x3ffe6108,len:0x2138 load:0x4004b000,len:0x4 load:0x4004b004,len:0xc30 load:0x4004f000,len:0x3544 SHA-256 comparison failed: Calculated: 7b4bf3281ac986894c811941b66f9443d4bc32bfd5862f7c1770019daafa3070 Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff Attempting to boot anyway... entry 0x4004b204 �[0;32mI (43) boot: ESP-IDF v5.1.2-dirty 2nd stage bootloader�[0m �[0;32mI (43) boot: compile time Dec 2 2023 23:05:15�[0m D (43) bootloader_flash: non-XMC chip detected by SFDP Read (00), skip.�[0m D (49) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)�[0m �[0;32mI (56) boot: chip revision: v0.0�[0m D (60) boot.esp32s2: magic e9�[0m D (63) boot.esp32s2: segments 04�[0m D (66) boot.esp32s2: spi_mode 02�[0m D (70) boot.esp32s2: spi_speed 0f�[0m D (73) boot.esp32s2: spi_size 02�[0m �[0;32mI (76) boot.esp32s2: SPI Speed : 80MHz�[0m �[0;32mI (81) boot.esp32s2: SPI Mode : DIO�[0m �[0;32mI (86) boot.esp32s2: SPI Flash Size : 4MB�[0m D (91) boot: Enabling RTCWDT(9000 ms)�[0m �[0;32mI (94) boot: Enabling RNG early entropy source...�[0m D (100) bootloader_flash: rodata starts from paddr=0x00008000, size=0xc00, will be mapped to vaddr=0x3f000000�[0m D (110) boot: mapped partition table 0x8000 at 0x3f008000�[0m D (115) flash_parts: partition table verified, 4 entries�[0m �[0;32mI (121) boot: Partition Table:�[0m �[0;32mI (124) boot: ## Label Usage Type ST Offset Length�[0m D (132) boot: load partition table entry 0x3f008000�[0m D (137) boot: type=1 subtype=2�[0m �[0;32mI (140) boot: 0 nvs WiFi data 01 02 00009000 00006000�[0m D (147) boot: load partition table entry 0x3f008020�[0m D (152) boot: type=1 subtype=1�[0m �[0;32mI (155) boot: 1 phy_init RF data 01 01 0000f000 00001000�[0m D (163) boot: load partition table entry 0x3f008040�[0m D (168) boot: type=0 subtype=0�[0m �[0;32mI (171) boot: 2 factory factory app 00 00 00010000 00177000�[0m �[0;32mI (179) boot: End of partition table�[0m D (183) boot: Trying partition index -1 offs 0x10000 size 0x177000�[0m D (189) esp_image: reading image header @ 0x10000�[0m D (194) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)�[0m D (201) esp_image: image header: 0xe9 0x05 0x02 0x02 4002344c�[0m �[0;32mI (206) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=28cd8h (167128) map�[0m D (206) esp_image: free data page_count 0x00000038�[0m D (209) bootloader_flash: rodata starts from paddr=0x00010020, size=0x28cd8, will be mapped to vaddr=0x3f000000�[0m D (240) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)�[0m �[0;32mI (240) esp_image: segment 1: paddr=00038d00 vaddr=3ffc8b60 size=04920h ( 18720) load�[0m D (244) esp_image: free data page_count 0x00000038�[0m D (249) bootloader_flash: rodata starts from paddr=0x00038d00, size=0x4920, will be mapped to vaddr=0x3f000000�[0m D (262) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)�[0m �[0;32mI (266) esp_image: segment 2: paddr=0003d628 vaddr=40022000 size=029f0h ( 10736) load�[0m D (275) esp_image: free data page_count 0x00000038�[0m D (279) bootloader_flash: rodata starts from paddr=0x0003d628, size=0x29f0, will be mapped to vaddr=0x3f000000�[0m D (292) bootloader_flash: mmu set block paddr=0x00040000 (was 0xffffffff)�[0m �[0;32mI (296) esp_image: segment 3: paddr=00040020 vaddr=40080020 size=969ech (616940) map�[0m D (305) esp_image: free data page_count 0x00000038�[0m D (310) bootloader_flash: rodata starts from paddr=0x00040020, size=0x969ec, will be mapped to vaddr=0x3f000000�[0m D (398) bootloader_flash: mmu set block paddr=0x000d0000 (was 0xffffffff)�[0m �[0;32mI (398) esp_image: segment 4: paddr=000d6a14 vaddr=400249f0 size=14164h ( 82276) load�[0m D (402) esp_image: free data page_count 0x00000038�[0m D (407) bootloader_flash: rodata starts from paddr=0x000d6a14, size=0x14164, will be mapped to vaddr=0x3f000000�[0m �[0;32mI (444) boot: Loaded app from partition at offset 0x10000�[0m �[0;32mI (444) boot: Disabling RNG early entropy source...�[0m D (444) boot: Mapping segment 0 as DROM�[0m D (448) boot: Mapping segment 3 as IROM�[0m D (452) boot: calling set_cache_and_start_app�[0m D (456) boot: configure drom and irom and start�[0m D (461) boot: start: 0x4002344c�[0m �[0;32mI (475) cpu_start: Unicore app�[0m �[0;32mI (475) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte�[0m
Steps to reproduce.
compile and flash using ESP-Prog
Build or installation Logs.
More Information.
Same code works fine on IDF 5.0.1. Problem started with 5.0.4
The text was updated successfully, but these errors were encountered: