esp_image: invalid segment length 0xffffffff
Posted: Mon Sep 23, 2019 7:48 am
When I run the simple_ota_example, I encountered the invalid segment length problem. The error message is "esp_image: invalid segment length 0xffffffff". Below is a capture from the development platform:
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/Simon/esp/esp-idf/requirements.txt are s atisfied.
MONITOR
--- idf_monitor on com10 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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6184
load:0x40078000,len:10180
load:0x40080400,len:6660
entry 0x40080764
I (29) boot: ESP-IDF v3.2.2 2nd stage bootloader
I (29) boot: compile time 14:07:02
I (29) boot: Enabling RNG early entropy source...
I (33) boot: SPI Speed : 40MHz
I (38) boot: SPI Mode : DIO
I (42) boot: SPI Flash Size : 4MB
I (46) boot: Partition Table:
I (49) boot: ## Label Usage Type ST Offset Length
I (56) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (64) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (71) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (79) boot: 3 factory factory app 00 00 00010000 00100000
I (86) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (94) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (101) boot: End of partition table
I (106) boot: Defaulting to factory image
I (110) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1c878 (11
6856) map
I (160) esp_image: segment 1: paddr=0x0002c8a0 vaddr=0x3ffb0000 size=0x02ef4 ( 1
2020) load
I (165) esp_image: segment 2: paddr=0x0002f79c vaddr=0x40080000 size=0x00400 (
1024) load
0x40080000: _WindowOverflow4 at C:/msys32/home/Simon/esp/esp-idf/components/free
rtos/xtensa_vectors.S:1779
I (167) esp_image: segment 3: paddr=0x0002fba4 vaddr=0x40080400 size=0x0046c (
1132) load
I (176) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x857c0 (54
6752) map
0x400d0018: _stext at ??:?
I (2739) wifi: state: assoc -> run (10)
I (2759) wifi: connected with HELLO_INNOPLAY, channel 11
I (2759) wifi: pm start, type: 1
I (3759) event: sta ip: 10.0.1.67, mask: 255.255.255.0, gw: 10.0.1.1
I (3759) simple_ota_example: Connect to Wifi ! Start to Connect to Server....
I (5849) esp_https_ota: Starting OTA...
I (5849) esp_https_ota: Writing to partition subtype 16 at offset 0x110000
I (6049) esp_https_ota: esp_ota_begin succeeded
I (6049) esp_https_ota: Please Wait. This may take time
I (6059) esp_https_ota: Connection closed,all data received
I (6069) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x07518 ( 29976) map
E (6089) esp_image: invalid segment length 0xffffffff
E (6089) esp_https_ota: Error: esp_ota_end failed! err=0x5379. Image is invalid
E (6099) simple_ota_example: Firmware Upgrades Failed
Any idea what cause this problem?
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
Python requirements from C:/msys32/home/Simon/esp/esp-idf/requirements.txt are s atisfied.
MONITOR
--- idf_monitor on com10 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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6184
load:0x40078000,len:10180
load:0x40080400,len:6660
entry 0x40080764
I (29) boot: ESP-IDF v3.2.2 2nd stage bootloader
I (29) boot: compile time 14:07:02
I (29) boot: Enabling RNG early entropy source...
I (33) boot: SPI Speed : 40MHz
I (38) boot: SPI Mode : DIO
I (42) boot: SPI Flash Size : 4MB
I (46) boot: Partition Table:
I (49) boot: ## Label Usage Type ST Offset Length
I (56) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (64) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (71) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (79) boot: 3 factory factory app 00 00 00010000 00100000
I (86) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (94) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (101) boot: End of partition table
I (106) boot: Defaulting to factory image
I (110) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1c878 (11
6856) map
I (160) esp_image: segment 1: paddr=0x0002c8a0 vaddr=0x3ffb0000 size=0x02ef4 ( 1
2020) load
I (165) esp_image: segment 2: paddr=0x0002f79c vaddr=0x40080000 size=0x00400 (
1024) load
0x40080000: _WindowOverflow4 at C:/msys32/home/Simon/esp/esp-idf/components/free
rtos/xtensa_vectors.S:1779
I (167) esp_image: segment 3: paddr=0x0002fba4 vaddr=0x40080400 size=0x0046c (
1132) load
I (176) esp_image: segment 4: paddr=0x00030018 vaddr=0x400d0018 size=0x857c0 (54
6752) map
0x400d0018: _stext at ??:?
I (2739) wifi: state: assoc -> run (10)
I (2759) wifi: connected with HELLO_INNOPLAY, channel 11
I (2759) wifi: pm start, type: 1
I (3759) event: sta ip: 10.0.1.67, mask: 255.255.255.0, gw: 10.0.1.1
I (3759) simple_ota_example: Connect to Wifi ! Start to Connect to Server....
I (5849) esp_https_ota: Starting OTA...
I (5849) esp_https_ota: Writing to partition subtype 16 at offset 0x110000
I (6049) esp_https_ota: esp_ota_begin succeeded
I (6049) esp_https_ota: Please Wait. This may take time
I (6059) esp_https_ota: Connection closed,all data received
I (6069) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x07518 ( 29976) map
E (6089) esp_image: invalid segment length 0xffffffff
E (6089) esp_https_ota: Error: esp_ota_end failed! err=0x5379. Image is invalid
E (6099) simple_ota_example: Firmware Upgrades Failed
Any idea what cause this problem?