nvs: nvs_flash_init_custom "item should have been present in cache" when flashing with ESP-IDF 3.1 after 3.2
Posted: Tue Aug 14, 2018 2:57 pm
I have a DEVKIT C that I have been working with on one computer, then installed ESP-IDF on a new computer. I wanted to test something on the old computer/old build, it flashed OK, then crashes with nvs_flash_init.
The DEVKIT can be flashed on the new computer and works again.
Next post has startup from same code flashed with ESP IDF 3.2. Is this expected behaviour?
The DEVKIT can be flashed on the new computer and works again.
Code: Select all
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:6016
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:15692
entry 0x40079018
I (30) boot: ESP-IDF v3.1-dev-463-g77eae33a-dirty 2nd stage bootloader
I (30) boot: compile time 15:38:56
I (32) boot: Enabling RNG early entropy source...
I (37) qio_mode: Enabling default flash chip QIO
I (42) boot: SPI Speed : 80MHz
I (47) boot: SPI Mode : QIO
I (51) boot: SPI Flash Size : 4MB
I (55) boot: Partition Table:
I (58) boot: ## Label Usage Type ST Offset Length
I (65) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (73) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (80) boot: 2 factory factory app 00 00 00010000 00100000
I (88) boot: End of partition table
I (92) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x13458 ( 78936) map
I (110) esp_image: segment 1: paddr=0x00023480 vaddr=0x3ffb0000 size=0x03264 ( 12900) load
I (111) esp_image: segment 2: paddr=0x000266ec vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _iram_start at C:/msys32/home/jcsba/esp/esp-idf/components/freertos/xtensa_vectors.S:1685
I (119) esp_image: segment 3: paddr=0x00026af4 vaddr=0x40080400 size=0x0951c ( 38172) load
I (133) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x58d08 (363784) map
0x400d0018: _stext at ??:?
I (177) esp_image: segment 5: paddr=0x00088d28 vaddr=0x4008991c size=0x07268 ( 29288) load
0x4008991c: udp_sendto_if_src at C:/msys32/home/jcsba/esp/esp-idf/components/lwip/core/udp.c:1157
I (181) esp_image: segment 6: paddr=0x0008ff98 vaddr=0x400c0000 size=0x00000 ( 0) load
I (187) boot: Loaded app from partition at offset 0x10000
I (190) boot: Disabling RNG early entropy source...
I (195) cpu_start: Pro cpu up.
I (199) cpu_start: Starting app cpu, entry point is 0x40081190
0x40081190: call_start_cpu1 at C:/msys32/home/jcsba/esp/esp-idf/components/esp32/cpu_start.c:225
I (180) cpu_start: App cpu up.
I (209) heap_init: Initializing. RAM available for dynamic allocation:
D (216) heap_init: New heap initialised at 0x3ffae6e0
I (221) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (227) heap_init: New heap initialised at 0x3ffb9000
I (233) heap_init: At 3FFB9000 len 00027000 (156 KiB): DRAM
I (239) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (245) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (252) heap_init: New heap initialised at 0x40090b84
I (257) heap_init: At 40090B84 len 0000F47C (61 KiB): IRAM
I (263) cpu_start: Pro cpu start user code
D (275) clk: RTC_SLOW_CLK calibration value: 3188480
D (60) intr_alloc: Connected src 46 to int 2 (cpu 0)
D (61) intr_alloc: Connected src 57 to int 3 (cpu 0)
D (61) intr_alloc: Connected src 24 to int 9 (cpu 0)
I (66) cpu_start: Starting scheduler on PRO CPU.
D (0) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (4) cpu_start: Starting scheduler on APP CPU.
D (91) heap_init: New heap initialised at 0x3ffe0440
D (97) heap_init: New heap initialised at 0x3ffe4350
D (102) intr_alloc: Connected src 16 to int 12 (cpu 0)
D (107) nvs: nvs_flash_init_custom partition=nvs start=9 count=6
assertion "false && "item should have been present in cache"" failed: file "C:/msys32/home/jcsba/esp/esp-idf/components/nvs_flash/src/nvs_item_hash_list.cpp", line 85, function: void nvs::HashList::erase(size_t
)
abort() was called at PC 0x400d571f on core 0
0x400d571f: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
Backtrace: 0x4008ead0:0x3ffbaab0 0x4008eca7:0x3ffbaad0 0x400d571f:0x3ffbaaf0 0x400e4144:0x3ffbab20 0x400e47b6:0x3ffbab40 0x400e4a91:0x3ffbab80 0x400e3834:0x3ffbabd0 0x400e33db:0x3ffbac20 0x400e3463:0x3ffbac50 0
x400e348e:0x3ffbac70 0x400d3f67:0x3ffbac90 0x400d10ae:0x3ffbad80
0x4008ead0: invoke_abort at C:/msys32/home/jcsba/esp/esp-idf/components/esp32/panic.c:648
0x4008eca7: abort at C:/msys32/home/jcsba/esp/esp-idf/components/esp32/panic.c:648
0x400d571f: __assert_func at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdlib/../../../.././newlib/libc/stdlib/assert.c:63 (discriminator 8)
0x400e4144: nvs::HashList::erase(unsigned int) at C:/msys32/home/jcsba/esp/esp-idf/components/nvs_flash/src/nvs_item_hash_list.cpp:85
0x400e47b6: nvs::Page::eraseEntryAndSpan(unsigned int) at C:/msys32/home/jcsba/esp/esp-idf/components/nvs_flash/src/nvs_page.cpp:311
0x400e4a91: nvs::Page::findItem(unsigned char, nvs::ItemType, char const*, unsigned int&, nvs::Item&) at C:/msys32/home/jcsba/esp/esp-idf/components/nvs_flash/src/nvs_page.cpp:311