OTA upgrade using "esp32-s3" failed

fan183579
Posts: 81
Joined: Thu Nov 25, 2021 6:37 am

OTA upgrade using "esp32-s3" failed

Postby fan183579 » Tue Mar 29, 2022 3:42 am

"Esp-idf4.4" is used. The routine is "native_ota_example". When upgrading OTA, it always fails, but the reason is not found. It has been recompiled and uploaded many times. The following is the complete log

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x18 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fcd0108,len:0x1650
load:0x403b6000,len:0xb7c
load:0x403ba000,len:0x2f58
entry 0x403b6248
I (32) boot: ESP-IDF v4.4-dirty 2nd stage bootloader
I (32) boot: compile time 10:13:08
I (32) boot: chip revision: 0
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (39) boot.esp32s3: SPI Mode : SLOW READ
I (44) boot.esp32s3: SPI Flash Size : 16MB
I (49) boot: Enabling RNG early entropy source...
I (55) boot: Partition Table:
I (58) boot: ## Label Usage Type ST Offset Length
I (65) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (73) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (80) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (88) boot: 3 factory factory app 00 00 00010000 00300000
I (95) boot: 4 ota_0 OTA app 00 10 00310000 00300000
I (103) boot: 5 ota_1 OTA app 00 11 00610000 00300000
I (110) boot: End of partition table
I (115) boot: Defaulting to factory image
I (119) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=1ba70h (113264) map
I (154) esp_image: segment 1: paddr=0002ba98 vaddr=3fc943c0 size=040c8h ( 16584) load
I (159) esp_image: segment 2: paddr=0002fb68 vaddr=40374000 size=004b0h ( 1200) load
I (161) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=8a47ch (566396) map
I (302) esp_image: segment 4: paddr=000ba4a4 vaddr=403744b0 size=0ff08h ( 65288) load
I (320) esp_image: segment 5: paddr=000ca3b4 vaddr=50000000 size=00010h ( 16) load
I (327) boot: Loaded app from partition at offset 0x10000
I (327) boot: Disabling RNG early entropy source...
I (340) cpu_start: Pro cpu up.
I (340) cpu_start: Starting app cpu, entry point is 0x403751c4
0x403751c4: call_start_cpu1 at E:/.espressif/frameworks/esp-idf-v4.4/components/esp_system/port/cpu_start.c:156

I (0) cpu_start: App cpu up.
I (354) cpu_start: Pro cpu start user code
I (354) cpu_start: cpu freq: 160000000
I (354) cpu_start: Application information:
I (357) cpu_start: Project name: lcd_lvgl
I (362) cpu_start: App version: 1.0.0
I (367) cpu_start: Compile time: Mar 29 2022 10:43:55
I (373) cpu_start: ELF file SHA256: 38c75b6c9c54a9b1...
I (379) cpu_start: ESP-IDF: v4.4-dirty
I (384) heap_init: Initializing. RAM available for dynamic allocation:
I (392) heap_init: At 3FC9C448 len 00043BB8 (270 KiB): D/IRAM
I (398) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (405) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (411) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (418) spi_flash: detected chip: mxic
W (422) spi_flash: Detected flash size > 16 MB, but access beyond 16 MB is not supported for this flash model yet.
I (433) spi_flash: flash io: dio
W (437) spi_flash: Detected size(32768k) larger than the size in the binary image header(16384k). Using the size in the binary image header.
I (451) sleep: Configure to isolate all GPIO pins in sleep state
I (457) sleep: Enable automatic switching of GPIO sleep configuration
I (464) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (487) native_ota_example: SHA-256 for the partition table: : ef3da872c51e46c9ec50ce42e8c3a835d35ae84f42541996655187323b433d5f
I (497) native_ota_example: SHA-256 for bootloader: : ef3da872c51e46c9ec50ce42e8c3a835d35ae84f42541996655187323b433d5f
I (507) native_ota_example: SHA-256 for current firmware: : ef3da872c51e46c9ec50ce42e8c3a835d35ae84f42541996655187323b433d5f
I (527) pp: pp rom version: e7ae62f
I (527) net80211: net80211 rom version: e7ae62f
I (547) wifi:wifi driver task: 3fce5604, prio:23, stack:6656, core=0
I (547) system_api: Base MAC address is not set
I (547) system_api: read default base MAC address from EFUSE
I (557) wifi:wifi firmware version: 7679c42
I (557) wifi:wifi certification version: v7.0
I (557) wifi:config NVS flash: enabled
I (557) wifi:config nano formating: disabled
I (567) wifi:Init data frame dynamic rx buffer num: 32
I (567) wifi:Init management frame dynamic rx buffer num: 32
I (577) wifi:Init management short buffer num: 32
I (577) wifi:Init dynamic tx buffer num: 32
I (587) wifi:Init static tx FG buffer num: 2
I (587) wifi:Init static rx buffer size: 1600
I (587) wifi:Init static rx buffer num: 10
I (597) wifi:Init dynamic rx buffer num: 32
I (597) wifi_init: rx ba win: 6
I (607) wifi_init: tcpip mbox: 32
I (607) wifi_init: udp mbox: 6
I (607) wifi_init: tcp mbox: 6
I (617) wifi_init: tcp tx win: 5744
I (617) wifi_init: tcp rx win: 5744
I (627) wifi_init: tcp mss: 1440
I (627) wifi_init: WiFi IRAM OP enabled
I (627) wifi_init: WiFi RX IRAM OP enabled
I (637) example_connect: Connecting to Mi 11...
I (647) phy_init: phy_version 302,3ddfab3,Dec 3 2021,14:39:12
W (647) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (707) wifi:mode : sta (7c:df:a1:e1:26:0c)
I (707) wifi:enable tsf
I (707) example_connect: Waiting for IP(s)
I (2757) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
I (3617) wifi:state: init -> auth (b0)
I (3637) wifi:state: auth -> assoc (0)
I (3697) wifi:state: assoc -> run (10)
I (3787) wifi:connected with Mi 11, aid = 2, channel 1, BW20, bssid = aa:91:d9:3f:a7:3d
I (3787) wifi:security: WPA2-PSK, phy: bgn, rssi: -16
I (3787) wifi:pm start, type: 1

I (3797) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 0, mt_pti: 25000, mt_time: 10000
W (3847) wifi:<ba-add>idx:0 (ifx:0, aa:91:d9:3f:a7:3d), tid:0, ssn:0, winSize:64
I (3947) wifi:BcnInt:102400, DTIM:2
I (4527) esp_netif_handlers: example_connect: sta ip: 192.168.177.15, mask: 255.255.255.0, gw: 192.168.177.13
I (4527) example_connect: Got IPv4 event: Interface "example_connect: sta" address: 192.168.177.15
I (5527) example_connect: Got IPv6 event: Interface "example_connect: sta" address: fe80:0000:0000:0000:7edf:a1ff:fee1:260c, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5527) example_connect: Connected to example_connect: sta
I (5537) example_connect: - IPv4 address: 192.168.177.15
I (5537) example_connect: - IPv6 address: fe80:0000:0000:0000:7edf:a1ff:fee1:260c, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5547) wifi:Set ps type: 0

I (5557) native_ota_example: Starting OTA example
I (5557) native_ota_example: Running partition type 0 subtype 0 (offset 0x00010000)
I (5837) native_ota_example: Writing to partition subtype 16 at offset 0x310000
I (5837) native_ota_example: New firmware version: 1.0.1
I (5837) native_ota_example: esp_ota_begin succeeded
W (6207) wifi:<ba-add>idx:1 (ifx:0, aa:91:d9:3f:a7:3d), tid:6, ssn:2, winSize:64
I (21747) native_ota_example: Connection closed
I (21747) native_ota_example: Total Write binary data length: 762864
E (21747) esp_image: image at 0x310000 has invalid magic byte (nothing flashed here?)
E (21757) native_ota_example: Image validation failed, image is corrupted
E (21767) native_ota_example: Exiting task due to fatal error...

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

Re: OTA upgrade using "esp32-s3" failed

Postby newsettler_AI » Tue Mar 29, 2022 3:51 pm

Hi, I would suggest you to check firmware dump of chip.

Code: Select all

E (21747) esp_image: image at 0x310000 has invalid magic byte (nothing flashed here?)
Does your loadable firmware really present in memory?

Who is online

Users browsing this forum: No registered users and 273 guests