Skip to content
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

Can't get core dump from flash - error "Invalid core dump CRC d59a4f1e, should be ffffffff" (IDFGH-2571) #4656

Closed
YuriK75 opened this issue Jan 22, 2020 · 4 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@YuriK75
Copy link

YuriK75 commented Jan 22, 2020

#4100 Environment

  • Development Kit: none
  • Module or chip used: ESP32-WROOM-32
  • IDF version 3.3.1
  • Build System: idf.py
  • Compiler version: 1.22.0-80-g6c4433a5
  • Operating System: Windows
  • (Windows only) environment type: ESP Command Prompt.
  • Using an IDE?: No
  • Power Supply: external 3.3V

Problem Description

I have ESP32D0WDQ6 on my custom board.
I modified hello_world example for making abort in task watchdog
and trying to get core dump from flash.

In menuconfig i set options for writing core dump to flash and for abort when
task watchdog timer triggers. I use custom partition table with coredump at 0x110000
(it is default address in espcoredump.py).

In main() i started task with watchdog and then delay for 10000 ms.
Task watchdog triggers, abort() called, dump writed to flash.

Expected Behavior

App abort, saved core dump to flash, useful espcoredump.py output after reading dump from flash.

Actual Behavior

App abort, saved core dump to flash, espcoredump.py reads core dunp and returns error "Invalid core dump CRC d59a4f1e, should be ffffffff"

Steps to reproduce

  1. Copy helloworld example
  2. Replace sdkconfig and hello_world_main.c, create custom mypartitions.csv as attached.

Code to reproduce this issue

1. hello_world_main.c:

    #include <stdio.h>
    #include "freertos/FreeRTOS.h"
    #include "freertos/task.h"
    #include "esp_system.h"
    #include "esp_task_wdt.h"
     
    void myRoutine(void *arg)
    {
        printf("myRoutine start\n");
        esp_task_wdt_add(NULL);
        vTaskDelay(10000);
    }
     
    void app_main()
    {
        printf("Hello world!\n");
       
        esp_task_wdt_add(NULL);
     
        xTaskCreatePinnedToCore(myRoutine,   // функция потока
                  "myRoutine",     // текстовая метка
                  10000,           // размер стека в СЛОВАХ (2 байта)
                  NULL,          // входной аргумент
                  1,             // приоритет
                  NULL, 0);   // handle
     
        while(true)
        {
            vTaskDelay(100);
            esp_task_wdt_reset();      
        }
    }

2. mypartitions.csv:
    # Name,   Type, SubType, Offset,  Size, Flags
    nvs,      data, nvs,    0x9000,     0x5000,
    otadata,  data, ota,    0xe000,     0x2000,
    app0,     app,  ota_0,  0x10000,    0x100000,
    coredump, data, coredump,0x110000,  0x40000,


## Debug Logs
c:\Users\yuri\esp\hello_world>idf.py -p COM3 monitor
Note: You are using Python 3.7.3. Python 3 support is new, please report any problems you encounter. Search for 'Setting the Python Interpreter' in the ESP-IDF docs if you want to use Python 2.7.
Checking Python dependencies...
Python requirements from c:\Zentec\lib\espidf331\requirements.txt are satisfied.
Running idf_monitor in directory c:\Users\yuri\esp\hello_world
Executing "C:\Users\yuri\.espressif\python_env\idf3.3_py3.7_env\Scripts\python.exe c:\Zentec\lib\espidf331\tools/idf_monitor.py -p COM3 -b 115200 c:\Users\yuri\esp\hello_world\build\firmware.elf -m 'C:\Users\yuri\.espressif\python_env\idf3.3_py3.7_env\Scripts\python.exe' 'c:\Zentec\lib\espidf331\tools\idf.py' '-p' 'COM3'"...
--- idf_monitor on COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57
 
rst:0x1 (POWERON_RESET),boot:0x13 (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:0x3fff0018,len:4
load:0x3fff001c,len:6560
ho 0 tail 12 room 4
load:0x40078000,len:11180
load:0x40080400,len:6004
entry 0x40080704
I (66) boot: Chip Revision: 1
I (34) boot: ESP-IDF v3.3.1 2nd stage bootloader
I (34) boot: compile time 11:35:46
I (34) boot: Enabling RNG early entropy source...
I (39) boot: SPI Speed      : 80MHz
I (43) boot: SPI Mode       : DIO
I (47) boot: SPI Flash Size : 4MB
I (51) boot: Partition Table:
I (54) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 nvs              WiFi data        01 02 00009000 00005000
I (69) boot:  1 otadata          OTA data         01 00 0000e000 00002000
I (77) boot:  2 app0             OTA app          00 10 00010000 00100000
I (84) boot:  3 coredump         Unknown data     01 03 00110000 00040000
I (91) boot: End of partition table
I (96) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x06114 ( 24852) map
I (112) esp_image: segment 1: paddr=0x0001613c vaddr=0x3ffbdb60 size=0x02550 (  9552) load
I (116) esp_image: segment 2: paddr=0x00018694 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at C:/Zentec/lib/espidf331/components/freertos/xtensa_vectors.S:1779
 
I (123) esp_image: segment 3: paddr=0x00018a9c vaddr=0x40080400 size=0x07574 ( 30068) load
I (141) esp_image: segment 4: paddr=0x00020018 vaddr=0x400d0018 size=0x13f68 ( 81768) map
0x400d0018: _stext at ??:?
 
I (164) esp_image: segment 5: paddr=0x00033f88 vaddr=0x40087974 size=0x01da0 (  7584) load
0x40087974: xPortGetCoreID at C:/Zentec/lib/espidf331/components/freertos/include/freertos/portable.h:210
 (inlined by) prvProcessTimerOrBlockTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:589
 (inlined by) prvTimerTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:544
 
I (173) boot: Loaded app from partition at offset 0x10000
I (173) boot: Disabling RNG early entropy source...
I (176) cpu_start: Pro cpu up.
I (180) cpu_start: Application information:
I (184) cpu_start: Project name:     esp-idf
I (189) cpu_start: App version:      1
I (194) cpu_start: Compile time:     Jan 16 2020 11:35:28
I (200) cpu_start: ELF file SHA256:  3326b1b89c849ed8...
I (206) cpu_start: ESP-IDF:          v3.3.1
I (211) cpu_start: Starting app cpu, entry point is 0x40081110
0x40081110: call_start_cpu1 at C:/Zentec/lib/espidf331/components/esp32/cpu_start.c:269
 
I (0) cpu_start: App cpu up.
I (221) heap_init: Initializing. RAM available for dynamic allocation:
I (228) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (235) heap_init: At 3FFC08E8 len 0001F718 (125 KiB): DRAM
I (240) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (247) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (256) heap_init: At 40089714 len 000168EC (90 KiB): IRAM
I (259) cpu_start: Pro cpu start user code
I (53) esp_core_dump_flash: Init core dump to flash
I (53) esp_core_dump_flash: Found partition 'coredump' @ 110000 262144 bytes
I (0) cpu_start: Starting scheduler on APP CPU..check failed: 0xffffffff -> 0xd59a4f1e!
E (10084) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (10084) task_wdt:  - myRoutine (CPU 0)
E (10084) task_wdt: Tasks currently running:
E (10084) task_wdt: CPU 0: IDLE0
E (10084) task_wdt: CPU 1: IDLE1
E (10084) task_wdt: Aborting.
abort() was called at PC 0x400d16fc on core 0
0x400d16fc: task_wdt_isr at C:/Zentec/lib/espidf331/components/esp32/task_wdt.c:252
 
 
ELF file SHA256: 3326b1b89c849ed8ee164a8d582122e3bbddf565178d0384b46bd0b880d0412e
 
Backtrace: 0x40088f87:0x3ffbe1e0 0x40089245:0x3ffbe200 0x400d16fc:0x3ffbe220 0x40082841:0x3ffbe240 0x400e3ea3:0x3ffb2830 0x400d1c93:0x3ffb2850 0x40086f69:0x3ffb2870
0x40088f87: invoke_abort at C:/Zentec/lib/espidf331/components/esp32/panic.c:715
 
0x40089245: abort at C:/Zentec/lib/espidf331/components/esp32/panic.c:715
 
0x400d16fc: task_wdt_isr at C:/Zentec/lib/espidf331/components/esp32/task_wdt.c:252
 
0x40082841: _xt_lowint1 at C:/Zentec/lib/espidf331/components/freertos/xtensa_vectors.S:1154
 
0x400e3ea3: esp_pm_impl_waiti at C:/Zentec/lib/espidf331/components/esp32/pm_esp32.c:492
 
0x400d1c93: esp_vApplicationIdleHook at C:/Zentec/lib/espidf331/components/esp32/freertos_hooks.c:86
 
0x40086f69: prvIdleTask at C:/Zentec/lib/espidf331/components/freertos/tasks.c:5063
 
 
I (5124) esp_core_dump_flash: Save core dump to flash...
I (5129) esp_core_dump_common: Found tasks: (8)!
E (5240) esp_core_dump_common: Skipped 1 tasks with bad TCB!
I (5240) esp_core_dump_flash: Core dump has been saved to flash.
Rebooting...
ets Jun  8 2016 00:22:57
 
rst:0xc (SW_CPU_RESET),boot:0x13 (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:0x3fff0018,len:4
load:0x3fff001c,len:6560
I (85) boot:  3 coredump         Unknown data     01 03 00110000 00040000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x06114 ( 24852) map
I (112) esp_image: segment 1: paddr=0x0001613c vaddr=0x3ffbdb60 size=0x02550 (  9552) load
I (117) esp_image: segment 2: paddr=0x00018694 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at C:/Zentec/lib/espidf331/components/freertos/xtensa_vectors.S:1779
 
I (123) esp_image: segment 3: paddr=0x00018a9c vaddr=0x40080400 size=0x07574 ( 30068) load
I (142) esp_image: segment 4: paddr=0x00020018 vaddr=0x400d0018 size=0x13f68 ( 81768) map
0x400d0018: _stext at ??:?
 
I (165) esp_image: segment 5: paddr=0x00033f88 vaddr=0x40087974 size=0x01da0 (  7584) load
0x40087974: xPortGetCoreID at C:/Zentec/lib/espidf331/components/freertos/include/freertos/portable.h:210
 (inlined by) prvProcessTimerOrBlockTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:589
 (inlined by) prvTimerTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:544
 
I (174) boot: Loaded app from partition at offset 0x10000
I (174) boot: Disabling RNG early entropy source...
I (176) cpu_start: Pro cpu up.
I (180) cpu_start: Application information:
I (185) cpu_start: Project name:     esp-idf
I (190) cpu_start: App version:      1
I (194) cpu_start: Compile time:     Jan 16 2020 11:35:28
I (200) cpu_start: ELF file SHA256:  3326b1b89c849ed8...
I (206) cpu_start: ESP-IDF:          v3.3.1
I (211) cpu_start: Starting app cpu, entry point is 0x40081110
0x40081110: call_start_cpu1 at C:/Zentec/lib/espidf331/components/esp32/cpu_start.c:269
 
I (201) cpu_start: App cpu up.
I (222) heap_init: Initializing. RAM available for dynamic allocation:
I (229) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (235) heap_init: At 3FFC08E8 len 0001F718 (125 KiB): DRAM
I (241) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (247) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (256) heap_init: At 40089714 len 000168EC (90 KiB): IRAM
I (260) cpu_start: Pro cpu start user code
I (54) esp_core_dump_flash: Init core dump to flash
I (54) esp_core_dump_flash: Found partition 'coredump' @ 110000 262144 bytes
I (0) cpu_start: Starting scheduler on APP CPU..check failed: 0xffffffff -> 0xd59a4f1e!
E (10085) task_wdt: CPU 1: IDLE1tly running:red. The following tasks did not reset the watchdog in time:
E (10085) task_wdt: Aborting.
abort() was called at PC 0x400d16fc on core 0
0x400d16fc: task_wdt_isr at C:/Zentec/lib/espidf331/components/esp32/task_wdt.c:252
 
 
ELF file SHA256: 3326b1b89c849ed8ee164a8d582122e3bbddf565178d0384b46bd0b880d0412e
 
Backtrace: 0x40088f87:0x3ffbe1e0 0x40089245:0x3ffbe200 0x400d16fc:0x3ffbe220 0x40082841:0x3ffbe240 0x400e3ea3:0x3ffb2830 0x400d1c93:0x3ffb2850 0x40086f69:0x3ffb2870
0x40088f87: invoke_abort at C:/Zentec/lib/espidf331/components/esp32/panic.c:715
 
0x40089245: abort at C:/Zentec/lib/espidf331/components/esp32/panic.c:715
 
0x400d16fc: task_wdt_isr at C:/Zentec/lib/espidf331/components/esp32/task_wdt.c:252
 
0x40082841: _xt_lowint1 at C:/Zentec/lib/espidf331/components/freertos/xtensa_vectors.S:1154
 
0x400e3ea3: esp_pm_impl_waiti at C:/Zentec/lib/espidf331/components/esp32/pm_esp32.c:492
 
0x400d1c93: esp_vApplicationIdleHook at C:/Zentec/lib/espidf331/components/esp32/freertos_hooks.c:86
 
0x40086f69: prvIdleTask at C:/Zentec/lib/espidf331/components/freertos/tasks.c:5063
 
 
I (5124) esp_core_dump_flash: Save core dump to flash...
I (5130) esp_core_dump_common: Found tasks: (8)!
E (5249) esp_core_dump_common: Skipped 1 tasks with bad TCB!
load:0x40078000,len:11180_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
load:0x40080400,len:6004
entry 0x40080704
I (67) boot: Chip Revision: 1
I (34) boot: ESP-IDF v3.3.1 2nd stage bootloader
I (34) boot: compile time 11:35:46
I (34) boot: Enabling RNG early entropy source...
I (39) boot: SPI Speed      : 80MHz
I (43) boot: SPI Mode       : DIO
I (47) boot: SPI Flash Size : 4MB
I (51) boot: Partition Table:
I (55) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 nvs              WiFi data        01 02 00009000 00005000
I (70) boot:  1 otadata          OTA data         01 00 0000e000 00002000
I (77) boot:  2 app0             OTA app          00 10 00010000 00100000
I (85) boot:  3 coredump         Unknown data     01 03 00110000 00040000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x06114 ( 24852) map
I (112) esp_image: segment 1: paddr=0x0001613c vaddr=0x3ffbdb60 size=0x02550 (  9552) load
I (117) esp_image: segment 2: paddr=0x00018694 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at C:/Zentec/lib/espidf331/components/freertos/xtensa_vectors.S:1779
 
I (123) esp_image: segment 3: paddr=0x00018a9c vaddr=0x40080400 size=0x07574 ( 30068) load
I (142) esp_image: segment 4: paddr=0x00020018 vaddr=0x400d0018 size=0x13f68 ( 81768) map
0x400d0018: _stext at ??:?
 
I (165) esp_image: segment 5: paddr=0x00033f88 vaddr=0x40087974 size=0x01da0 (  7584) load
0x40087974: xPortGetCoreID at C:/Zentec/lib/espidf331/components/freertos/include/freertos/portable.h:210
 (inlined by) prvProcessTimerOrBlockTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:589
 (inlined by) prvTimerTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:544
 
I (174) boot: Loaded app from partition at offset 0x10000
I (174) boot: Disabling RNG early entropy source...
I (176) cpu_start: Pro cpu up.
I (180) cpu_start: Application information:
I (185) cpu_start: Project name:     esp-idf
I (190) cpu_start: App version:      1
I (194) cpu_start: Compile time:     Jan 16 2020 11:35:28
I (200) cpu_start: ELF file SHA256:  3326b1b89c849ed8...
I (206) cpu_start: ESP-IDF:          v3.3.1
I (211) cpu_start: Starting app cpu, entry point is 0x40081110
0x40081110: call_start_cpu1 at C:/Zentec/lib/espidf331/components/esp32/cpu_start.c:269
 
I (201) cpu_start: App cpu up.
I (222) heap_init: Initializing. RAM available for dynamic allocation:
I (229) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (235) heap_init: At 3FFC08E8 len 0001F718 (125 KiB): DRAM
I (241) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (247) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (256) heap_init: At 40089714 len 000168EC (90 KiB): IRAM
I (260) cpu_start: Pro cpu start user code
I (54) esp_core_dump_flash: Init core dump to flash
I (54) esp_core_dump_flash: Found partition 'coredump' @ 110000 262144 bytes
I (0) cpu_start: Starting scheduler on APP CPU..check failed: 0xffffffff -> 0xd59a4f1e!
E (10085) task_wdt: CPU 1: IDLE1tly running:red. The following tasks did not reset the watchdog in time:
E (10085) task_wdt: Aborting.
abort() was called at PC 0x400d16fc on core 0
0x400d16fc: task_wdt_isr at C:/Zentec/lib/espidf331/components/esp32/task_wdt.c:252
 
 
ELF file SHA256: 3326b1b89c849ed8ee164a8d582122e3bbddf565178d0384b46bd0b880d0412e
 
Backtrace: 0x40088f87:0x3ffbe1e0 0x40089245:0x3ffbe200 0x400d16fc:0x3ffbe220 0x40082841:0x3ffbe240 0x400e3ea3:0x3ffb2830 0x400d1c93:0x3ffb2850 0x40086f69:0x3ffb2870
0x40088f87: invoke_abort at C:/Zentec/lib/espidf331/components/esp32/panic.c:715
 
0x40089245: abort at C:/Zentec/lib/espidf331/components/esp32/panic.c:715
 


0x400d16fc: task_wdt_isr at C:/Zentec/lib/espidf331/components/esp32/task_wdt.c:252
 
0x40082841: _xt_lowint1 at C:/Zentec/lib/espidf331/components/freertos/xtensa_vectors.S:1154
 
0x400e3ea3: esp_pm_impl_waiti at C:/Zentec/lib/espidf331/components/esp32/pm_esp32.c:492
 
0x400d1c93: esp_vApplicationIdleHook at C:/Zentec/lib/espidf331/components/esp32/freertos_hooks.c:86
 
0x40086f69: prvIdleTask at C:/Zentec/lib/espidf331/components/freertos/tasks.c:5063
 
 
I (5124) esp_core_dump_flash: Save core dump to flash...
I (5130) esp_core_dump_common: Found tasks: (8)!
E (5225) esp_core_dump_common: Skipped 1 tasks with bad TCB!
I (5225) esp_core_dump_flash: Core dump has been saved to flash.
Rebooting...
ets Jun  8 2016 00:22:57
 
rst:0xc (SW_CPU_RESET),boot:0x13 (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:0x3fff0018,len:4
load:0x3fff001c,len:6560
ho 0 tail 12 room 4
load:0x40078000,len:11180
load:0x40080400,len:6004
entry 0x40080704
I (92) boot: End of partition tableknown data     01 03 00110000 00040000
I (96) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x06114 ( 24852) map
I (112) esp_image: segment 1: paddr=0x0001613c vaddr=0x3ffbdb60 size=0x02550 (  9552) load
I (117) esp_image: segment 2: paddr=0x00018694 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at C:/Zentec/lib/espidf331/components/freertos/xtensa_vectors.S:1779
 
I (123) esp_image: segment 3: paddr=0x00018a9c vaddr=0x40080400 size=0x07574 ( 30068) load
I (142) esp_image: segment 4: paddr=0x00020018 vaddr=0x400d0018 size=0x13f68 ( 81768) map
0x400d0018: _stext at ??:?
 
I (165) esp_image: segment 5: paddr=0x00033f88 vaddr=0x40087974 size=0x01da0 (  7584) load
0x40087974: xPortGetCoreID at C:/Zentec/lib/espidf331/components/freertos/include/freertos/portable.h:210
 (inlined by) prvProcessTimerOrBlockTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:589
 (inlined by) prvTimerTask at C:/Zentec/lib/espidf331/components/freertos/timers.c:544
 
I (174) boot: Loaded app from partition at offset 0x10000
I (174) boot: Disabling RNG early entropy source...
I (176) cpu_start: Pro cpu up.
I (180) cpu_start: Application information:
I (185) cpu_start: Project name:     esp-idf
I (190) cpu_start: App version:      1
I (194) cpu_start: Compile time:     Jan 16 2020 11:35:28
I (200) cpu_start: ELF file SHA256:  3326b1b89c849ed8...
I (206) cpu_start: ESP-IDF:          v3.3.1
I (211) cpu_start: Starting app cpu, entry point is 0x40081110
0x40081110: call_start_cpu1 at C:/Zentec/lib/espidf331/components/esp32/cpu_start.c:269
 
I (201) cpu_start: App cpu up.
I (222) heap_init: Initializing. RAM available for dynamic allocation:
I (229) heap_init: At 3FFAE6E0 len 0000F480 (61 KiB): DRAM
I (235) heap_init: At 3FFC08E8 len 0001F718 (125 KiB): DRAM
I (241) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (247) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (256) heap_init: At 40089714 len 000168EC (90 KiB): IRAM
I (260) cpu_start: Pro cpu start user code
I (54) esp_core_dump_flash: Init core dump to flash
I (54) esp_core_dump_flash: Found partition 'coredump' @ 110000 262144 bytes
I (0) cpu_start: Starting scheduler on APP CPU..check failed: 0xffffffff -> 0xd59a4f1e!
myRoutine start
 
c:\Users\yuri\esp\hello_world>c:\Zentec\lib\espidf331\components\espcoredump\espcoredump.py -p COM3 info_corefile build\firmware.elf
espcoredump.py v0.3-dev
esptool.py v2.8
Serial port COM3
Connecting........_____.
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 30:ae:a4:f7:a5:34
Uploading stub...
Running stub...
Stub running...
4 (100 %)
4 (100 %)
Read 4 bytes at 0x110000 in 0.1 seconds (0.4 kbit/s)...
Hard resetting via RTS pin...
 
esptool.py v2.8
Serial port COM3
Connecting........_
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 30:ae:a4:f7:a5:34
Uploading stub...
Running stub...
Stub running...
5668 (100 %)
5668 (100 %)
Read 5668 bytes at 0x110000 in 0.5 seconds (85.3 kbit/s)...
Hard resetting via RTS pin...
 
 
A fatal error occurred: Invalid core dump CRC d59a4f1e, should be ffffffff

## Other items if possible

BIN, ELF, sdkconfig, hello_world_main.c ... etc attached in archive.

[esp-idf-issue-Invalid-core-dump-CRC.zip](https://github.com/espressif/esp-idf/files/4097705/esp-idf-issue-Invalid-core-dump-CRC.zip)
@github-actions github-actions bot changed the title Can't get core dump from flash - error "Invalid core dump CRC d59a4f1e, should be ffffffff" Can't get core dump from flash - error "Invalid core dump CRC d59a4f1e, should be ffffffff" (IDFGH-2571) Jan 22, 2020
@pumelo
Copy link

pumelo commented May 26, 2020

I'm having exactly the same issue. Did you find a way to resolve this?

I guess the key to this is
E (5249) esp_core_dump_common: Skipped 1 tasks with bad TCB!
This seems to make the core dump unusable ..
This does not happen if the reset was not triggered by a watchdog reset ...

@YuriK75
Copy link
Author

YuriK75 commented May 26, 2020 via email

@gerekon
Copy link
Collaborator

gerekon commented Mar 9, 2021

Hi!

There is a coredump bug in IDF v3.3. Here is the patch to fix it. We will backport that fix to 3.3.

diff --git a/components/espcoredump/src/core_dump_port.c b/components/espcoredump/src/core_dump_port.c
index e045b19a4e..fbbdc22a48 100644
--- a/components/espcoredump/src/core_dump_port.c
+++ b/components/espcoredump/src/core_dump_port.c
@@ -47,8 +47,11 @@ bool esp_core_dump_process_tcb(void *frame, core_dump_task_header_t *task_snapho
         return false;
     }
     if (task_snaphort->tcb_addr == xTaskGetCurrentTaskHandleForCPU(xPortGetCoreID())) {
-        // Set correct stack top for current task
-        task_snaphort->stack_start = (uint32_t)exc_frame;
+        // Set correct stack top for current task; only modify if we came from the task,
+        // and not an ISR that crashed.
+        if (!xPortInterruptedFromISRContext()) {
+            task_snaphort->stack_start = (uint32_t)exc_frame;
+        }
         // This field is not initialized for crashed task, but stack frame has the structure of interrupt one,
         // so make workaround to allow espcoredump to parse it properly.
         if (exc_frame->exit == 0)

@igrr
Copy link
Member

igrr commented Feb 24, 2022

This issue has been fixed in 4.x releases. I'm closing this issue since IDF 3.3 has reached EoL.

@igrr igrr closed this as completed Feb 24, 2022
@espressif-bot espressif-bot added Resolution: Done Issue is done internally Status: Done Issue is done internally labels Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

5 participants