esp32-s3 ota update fail
Posted: Mon Aug 15, 2022 10:07 am
I copy esp-adf/examples/advanced_examples/voip/tools/audio-esp.bin to tf card flash_tone.bin. but update fail. maybe what's problem?
```
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2b (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x17c0
load:0x403b6000,len:0xe64
load:0x403ba000,len:0x30e4
entry 0x403b6280
I (25) boot: ESP-IDF v4.4.1-149-g009e66e625-dirty 2nd stage bootloader
I (25) boot: compile time 12:21:31
I (25) boot: chip revision: 0
I (28) qio_mode: Enabling default flash chip QIO
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (39) boot.esp32s3: SPI Mode : QIO
I (43) boot.esp32s3: SPI Flash Size : 16MB
I (48) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (57) boot: ## Label Usage Type ST Offset Length
I (64) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (72) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (79) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (87) boot: 3 ota_0 OTA app 00 10 00010000 00290000
I (94) boot: 4 ota_1 OTA app 00 11 002a0000 00290000
I (102) boot: 5 model Unknown data 01 82 00530000 0040e000
I (109) boot: 6 flash_tone Unknown data 01 ff 0093e000 00080000
I (117) boot: End of partition table
I (121) boot: No factory image, trying OTA 0
I (126) esp_image: segment 0: paddr=00010020 vaddr=3c0b0020 size=22b78h (142200) map
I (156) esp_image: segment 1: paddr=00032ba0 vaddr=3fc9a890 size=045c4h ( 17860) load
I (160) esp_image: segment 2: paddr=0003716c vaddr=40378000 size=08each ( 36524) load
I (169) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=a3d54h (671060) map
I (272) esp_image: segment 4: paddr=000e3d7c vaddr=40380eac size=099e4h ( 39396) load
I (280) esp_image: segment 5: paddr=000ed768 vaddr=50000000 size=00010h ( 16) load
I (288) boot: Loaded app from partition at offset 0x10000
I (317) boot: Set actual ota_seq=1 in otadata[0]
I (318) boot: Disabling RNG early entropy source...
I (328) opi psram: vendor id : 0x0d (AP)
I (328) opi psram: dev id : 0x02 (generation 3)
I (329) opi psram: density : 0x03 (64 Mbit)
I (332) opi psram: good-die : 0x01 (Pass)
I (337) opi psram: Latency : 0x01 (Fixed)
I (342) opi psram: VCC : 0x01 (3V)
I (346) opi psram: SRF : 0x01 (Fast Refresh)
I (352) opi psram: BurstType : 0x01 (Hybrid Wrap)
I (357) opi psram: BurstLen : 0x01 (32 Byte)
I (362) opi psram: Readlatency : 0x02 (10 cycles@Fixed)
I (368) opi psram: DriveStrength: 0x00 (1/1)
W (373) PSRAM: DO NOT USE FOR MASS PRODUCTION! Timing parameters will be updated in future IDF version.
I (384) spiram: Found 64MBit SPI RAM device
I (388) spiram: SPI RAM mode: sram 80m
I (393) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (400) cpu_start: Pro cpu up.
I (403) cpu_start: Starting app cpu, entry point is 0x4037947c
0x4037947c: call_start_cpu1 at /root/esp-adf/esp-idf/components/esp_system/port/cpu_start.c:160
I (0) cpu_start: App cpu up.
I (695) spiram: SPI SRAM memory test OK
I (704) cpu_start: Pro cpu start user code
I (704) cpu_start: cpu freq: 240000000
I (704) cpu_start: Application information:
I (707) cpu_start: Project name: voice_extender
I (712) cpu_start: App version: v2.3-328-gd162e0b-dirty
I (719) cpu_start: Compile time: Aug 15 2022 05:45:40
I (725) cpu_start: ELF file SHA256: 6ca71aa04d21e441...
I (731) cpu_start: ESP-IDF: v4.4.1-149-g009e66e625-dirty
I (737) heap_init: Initializing. RAM available for dynamic allocation:
I (745) heap_init: At 3FCA2C90 len 0003D370 (244 KiB): D/IRAM
I (751) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (758) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (764) spiram: Adding pool of 8192K of external SPI memory to heap allocator
I (772) spi_flash: detected chip: gd
I (776) spi_flash: flash io: qio
I (780) sleep: Configure to isolate all GPIO pins in sleep state
I (787) sleep: Enable automatic switching of GPIO sleep configuration
I (794) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (804) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (824) HTTPS_OTA_EXAMPLE: [1.0] Initialize peripherals management
I (824) HTTPS_OTA_EXAMPLE: [1.1] Start and wait for Wi-Fi network
I (834) pp: pp rom version: e7ae62f
I (834) net80211: net80211 rom version: e7ae62f
I (854) wifi:wifi driver task: 3fcae5b0, prio:23, stack:6656, core=0
I (854) system_api: Base MAC address is not set
I (854) system_api: read default base MAC address from EFUSE
I (864) wifi:wifi firmware version: 195d59c
I (864) wifi:wifi certification version: v7.0
I (864) wifi:config NVS flash: enabled
I (874) wifi:config nano formating: disabled
I (874) wifi:Init data frame dynamic rx buffer num: 32
I (874) wifi:Init management frame dynamic rx buffer num: 32
I (884) wifi:Init management short buffer num: 32
I (884) wifi:Init static tx buffer num: 16
I (894) wifi:Init tx cache buffer num: 32
I (894) wifi:Init static tx FG buffer num: 2
I (904) wifi:Init static rx buffer size: 1600
I (904) wifi:Init static rx buffer num: 10
I (904) wifi:Init dynamic rx buffer num: 32
I (914) wifi_init: rx ba win: 6
I (914) wifi_init: tcpip mbox: 32
I (924) wifi_init: udp mbox: 6
I (924) wifi_init: tcp mbox: 6
I (924) wifi_init: tcp tx win: 5744
I (934) wifi_init: tcp rx win: 5744
I (934) wifi_init: tcp mss: 1440
I (944) wifi_init: WiFi IRAM OP enabled
I (944) wifi_init: WiFi RX IRAM OP enabled
I (944) phy_init: phy_version 501,79e7e9b,Apr 19 2022,11:10:08
I (1044) wifi:mode : sta (7c:df:a1:e7:8a:00)
I (1044) wifi:enable tsf
I (2834) wifi<13,2>, old:<1,0>, ap:<255,255>, sta:<13,2>, prof:1
I (3464) wifi:state: init -> auth (b0)
I (3474) wifi:state: auth -> assoc (0)
I (3484) wifi:state: assoc -> run (10)
I (3694) wifi:connected with home, aid = 4, channel 13, 40D, bssid = 9c:a6:15:e9:aa:53
I (3694) wifi:security: WPA2-PSK, phy: bgn, rssi: -29
I (3694) wifi:pm start, type: 1
I (3694) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 0, mt_pti: 25000, mt_time: 10000
W (3704) PERIPH_WIFI: WiFi Event cb, Unhandle event_base:WIFI_EVENT, event_id:4
W (3714) wifi:<ba-add>idx:0 (ifx:0, 9c:a6:15:e9:aa:53), tid:0, ssn:3, winSize:64
I (3754) wifi:BcnInt:102400, DTIM:1
I (4324) esp_netif_handlers: sta ip: 192.168.0.108, mask: 255.255.255.0, gw: 192.168.0.1
I (4324) PERIPH_WIFI: Got ip:192.168.0.108
I (4324) HTTPS_OTA_EXAMPLE: [1.2] Mount SDCard
I (4334) SDCARD: Using 1-line SD mode, 4-line SD mode, base path=/sdcard
I (4334) SDCARD: Using 1-line SD mode
I (4344) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (4344) gpio: GPIO[7]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (4354) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (4414) SDCARD: CID name SA08G!
I (4824) HTTPS_OTA_EXAMPLE: [2.0] Create OTA service
I (4824) HTTPS_OTA_EXAMPLE: [2.1] Set upgrade list
I (4824) HTTPS_OTA_EXAMPLE: [2.2] Start OTA service
I (4824) HTTPS_OTA_EXAMPLE: Func:app_main, Line:223, MEM Total:8505811 Bytes, Inter:147643 Bytes, Dram:147643 Bytes
I (4834) OTA_DEFAULT: data upgrade uri file://sdcard/flash_tone.bin
E (4844) FATFS_STREAM: Failed to open. File name: /sdcard/flash_tone.bin, error message: Invalid argument, line: 116
E (4854) AUDIO_ELEMENT: [file] AEL_STATUS_ERROR_OPEN,-1
W (4864) AUDIO_ELEMENT: [file] audio_element_on_cmd_error,7
E (4864) OTA_DEFAULT: reader stream init failed
E (4874) OTA_SERVICE: OTA prepared fail
E (4874) HTTPS_OTA_EXAMPLE: List id: 0, OTA failed
E (4884) esp_https_ota: No option for server verification is enabled in esp_http_client config.
E (4894) OTA_DEFAULT: ESP HTTPS OTA Begin failed
E (4894) OTA_SERVICE: OTA prepared fail
E (4904) HTTPS_OTA_EXAMPLE: List id: 1, OTA failed
W (4904) OTA_SERVICE: OTA_END!
I (4914) HTTPS_OTA_EXAMPLE: [2.3] Finish OTA service
I (4914) HTTPS_OTA_EXAMPLE: [2.4] Clear OTA service
```
```
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x2b (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x17c0
load:0x403b6000,len:0xe64
load:0x403ba000,len:0x30e4
entry 0x403b6280
I (25) boot: ESP-IDF v4.4.1-149-g009e66e625-dirty 2nd stage bootloader
I (25) boot: compile time 12:21:31
I (25) boot: chip revision: 0
I (28) qio_mode: Enabling default flash chip QIO
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I (39) boot.esp32s3: SPI Mode : QIO
I (43) boot.esp32s3: SPI Flash Size : 16MB
I (48) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (57) boot: ## Label Usage Type ST Offset Length
I (64) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (72) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (79) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (87) boot: 3 ota_0 OTA app 00 10 00010000 00290000
I (94) boot: 4 ota_1 OTA app 00 11 002a0000 00290000
I (102) boot: 5 model Unknown data 01 82 00530000 0040e000
I (109) boot: 6 flash_tone Unknown data 01 ff 0093e000 00080000
I (117) boot: End of partition table
I (121) boot: No factory image, trying OTA 0
I (126) esp_image: segment 0: paddr=00010020 vaddr=3c0b0020 size=22b78h (142200) map
I (156) esp_image: segment 1: paddr=00032ba0 vaddr=3fc9a890 size=045c4h ( 17860) load
I (160) esp_image: segment 2: paddr=0003716c vaddr=40378000 size=08each ( 36524) load
I (169) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=a3d54h (671060) map
I (272) esp_image: segment 4: paddr=000e3d7c vaddr=40380eac size=099e4h ( 39396) load
I (280) esp_image: segment 5: paddr=000ed768 vaddr=50000000 size=00010h ( 16) load
I (288) boot: Loaded app from partition at offset 0x10000
I (317) boot: Set actual ota_seq=1 in otadata[0]
I (318) boot: Disabling RNG early entropy source...
I (328) opi psram: vendor id : 0x0d (AP)
I (328) opi psram: dev id : 0x02 (generation 3)
I (329) opi psram: density : 0x03 (64 Mbit)
I (332) opi psram: good-die : 0x01 (Pass)
I (337) opi psram: Latency : 0x01 (Fixed)
I (342) opi psram: VCC : 0x01 (3V)
I (346) opi psram: SRF : 0x01 (Fast Refresh)
I (352) opi psram: BurstType : 0x01 (Hybrid Wrap)
I (357) opi psram: BurstLen : 0x01 (32 Byte)
I (362) opi psram: Readlatency : 0x02 (10 cycles@Fixed)
I (368) opi psram: DriveStrength: 0x00 (1/1)
W (373) PSRAM: DO NOT USE FOR MASS PRODUCTION! Timing parameters will be updated in future IDF version.
I (384) spiram: Found 64MBit SPI RAM device
I (388) spiram: SPI RAM mode: sram 80m
I (393) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (400) cpu_start: Pro cpu up.
I (403) cpu_start: Starting app cpu, entry point is 0x4037947c
0x4037947c: call_start_cpu1 at /root/esp-adf/esp-idf/components/esp_system/port/cpu_start.c:160
I (0) cpu_start: App cpu up.
I (695) spiram: SPI SRAM memory test OK
I (704) cpu_start: Pro cpu start user code
I (704) cpu_start: cpu freq: 240000000
I (704) cpu_start: Application information:
I (707) cpu_start: Project name: voice_extender
I (712) cpu_start: App version: v2.3-328-gd162e0b-dirty
I (719) cpu_start: Compile time: Aug 15 2022 05:45:40
I (725) cpu_start: ELF file SHA256: 6ca71aa04d21e441...
I (731) cpu_start: ESP-IDF: v4.4.1-149-g009e66e625-dirty
I (737) heap_init: Initializing. RAM available for dynamic allocation:
I (745) heap_init: At 3FCA2C90 len 0003D370 (244 KiB): D/IRAM
I (751) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (758) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (764) spiram: Adding pool of 8192K of external SPI memory to heap allocator
I (772) spi_flash: detected chip: gd
I (776) spi_flash: flash io: qio
I (780) sleep: Configure to isolate all GPIO pins in sleep state
I (787) sleep: Enable automatic switching of GPIO sleep configuration
I (794) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (804) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (824) HTTPS_OTA_EXAMPLE: [1.0] Initialize peripherals management
I (824) HTTPS_OTA_EXAMPLE: [1.1] Start and wait for Wi-Fi network
I (834) pp: pp rom version: e7ae62f
I (834) net80211: net80211 rom version: e7ae62f
I (854) wifi:wifi driver task: 3fcae5b0, prio:23, stack:6656, core=0
I (854) system_api: Base MAC address is not set
I (854) system_api: read default base MAC address from EFUSE
I (864) wifi:wifi firmware version: 195d59c
I (864) wifi:wifi certification version: v7.0
I (864) wifi:config NVS flash: enabled
I (874) wifi:config nano formating: disabled
I (874) wifi:Init data frame dynamic rx buffer num: 32
I (874) wifi:Init management frame dynamic rx buffer num: 32
I (884) wifi:Init management short buffer num: 32
I (884) wifi:Init static tx buffer num: 16
I (894) wifi:Init tx cache buffer num: 32
I (894) wifi:Init static tx FG buffer num: 2
I (904) wifi:Init static rx buffer size: 1600
I (904) wifi:Init static rx buffer num: 10
I (904) wifi:Init dynamic rx buffer num: 32
I (914) wifi_init: rx ba win: 6
I (914) wifi_init: tcpip mbox: 32
I (924) wifi_init: udp mbox: 6
I (924) wifi_init: tcp mbox: 6
I (924) wifi_init: tcp tx win: 5744
I (934) wifi_init: tcp rx win: 5744
I (934) wifi_init: tcp mss: 1440
I (944) wifi_init: WiFi IRAM OP enabled
I (944) wifi_init: WiFi RX IRAM OP enabled
I (944) phy_init: phy_version 501,79e7e9b,Apr 19 2022,11:10:08
I (1044) wifi:mode : sta (7c:df:a1:e7:8a:00)
I (1044) wifi:enable tsf
I (2834) wifi<13,2>, old:<1,0>, ap:<255,255>, sta:<13,2>, prof:1
I (3464) wifi:state: init -> auth (b0)
I (3474) wifi:state: auth -> assoc (0)
I (3484) wifi:state: assoc -> run (10)
I (3694) wifi:connected with home, aid = 4, channel 13, 40D, bssid = 9c:a6:15:e9:aa:53
I (3694) wifi:security: WPA2-PSK, phy: bgn, rssi: -29
I (3694) wifi:pm start, type: 1
I (3694) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 0, mt_pti: 25000, mt_time: 10000
W (3704) PERIPH_WIFI: WiFi Event cb, Unhandle event_base:WIFI_EVENT, event_id:4
W (3714) wifi:<ba-add>idx:0 (ifx:0, 9c:a6:15:e9:aa:53), tid:0, ssn:3, winSize:64
I (3754) wifi:BcnInt:102400, DTIM:1
I (4324) esp_netif_handlers: sta ip: 192.168.0.108, mask: 255.255.255.0, gw: 192.168.0.1
I (4324) PERIPH_WIFI: Got ip:192.168.0.108
I (4324) HTTPS_OTA_EXAMPLE: [1.2] Mount SDCard
I (4334) SDCARD: Using 1-line SD mode, 4-line SD mode, base path=/sdcard
I (4334) SDCARD: Using 1-line SD mode
I (4344) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (4344) gpio: GPIO[7]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (4354) gpio: GPIO[4]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (4414) SDCARD: CID name SA08G!
I (4824) HTTPS_OTA_EXAMPLE: [2.0] Create OTA service
I (4824) HTTPS_OTA_EXAMPLE: [2.1] Set upgrade list
I (4824) HTTPS_OTA_EXAMPLE: [2.2] Start OTA service
I (4824) HTTPS_OTA_EXAMPLE: Func:app_main, Line:223, MEM Total:8505811 Bytes, Inter:147643 Bytes, Dram:147643 Bytes
I (4834) OTA_DEFAULT: data upgrade uri file://sdcard/flash_tone.bin
E (4844) FATFS_STREAM: Failed to open. File name: /sdcard/flash_tone.bin, error message: Invalid argument, line: 116
E (4854) AUDIO_ELEMENT: [file] AEL_STATUS_ERROR_OPEN,-1
W (4864) AUDIO_ELEMENT: [file] audio_element_on_cmd_error,7
E (4864) OTA_DEFAULT: reader stream init failed
E (4874) OTA_SERVICE: OTA prepared fail
E (4874) HTTPS_OTA_EXAMPLE: List id: 0, OTA failed
E (4884) esp_https_ota: No option for server verification is enabled in esp_http_client config.
E (4894) OTA_DEFAULT: ESP HTTPS OTA Begin failed
E (4894) OTA_SERVICE: OTA prepared fail
E (4904) HTTPS_OTA_EXAMPLE: List id: 1, OTA failed
W (4904) OTA_SERVICE: OTA_END!
I (4914) HTTPS_OTA_EXAMPLE: [2.3] Finish OTA service
I (4914) HTTPS_OTA_EXAMPLE: [2.4] Clear OTA service
```