OTA and Memory partitions

Palonso
Posts: 95
Joined: Tue Sep 24, 2019 8:43 pm

OTA and Memory partitions

Postby Palonso » Tue Sep 24, 2019 9:08 pm

Hi,

I'm trying to update my ESP-WROOM-32D (DevKit) firmware through OTA, yet the results I get is that I can update the firmware only once and then the new firmware seems to override the previous OTA firmware and can't update any more unless I connect it to the PC with a USB.

I'm using the native_ota example from github and followed the steps to mount a server on my computer with the hello-world example code, the only thing I change is the PROJECT_VER variable from 1 to 2 (I also changed the print to "hello world version 2") so the native_ota example download and upgrade the firmware.

My biggest doubt in this is:
I have to add the OTA update code feature in the hello-world code too so I can keep updating (let's say to a hello-world version 3)?
Or is there some way to start the program from the factory partition check for updates and then change to the corresponding OTA to run the main program?

this is what i get in the monitor from what i have already done:

Code: Select all

--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
32mI (43) boot: �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:6452
load:0x40078000,len:14616
load:0x40080400,len:4240
entry 0x400806dc
I (28) boot: ESP-IDF v4.1-dev-256-g9f145ff16-dirty 2nd stage bootloader
I (29) boot: compile time 17:00:04
I (30) boot: Enabling RNG early entropy source...
I (35) boot: SPI Speed      : 40MHz
I (39) boot: SPI Mode       : DIO
I (43) boot: SPI Flash Size : 4MB
I (47) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (58) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (66) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (73) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (81) boot:  3 factory          factory app      00 00 00010000 00100000
I (88) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (96) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (103) boot: End of partition table
I (107) boot: Defaulting to factory image
I (112) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1f7e4 (128996) map
I (167) esp_image: segment 1: paddr=0x0002f80c vaddr=0x3ffb0000 size=0x00804 (  2052) load
I (168) esp_image: segment 2: paddr=0x00030018 vaddr=0x400d0018 size=0x90310 (590608) map
0x400d0018: _stext at ??:?

I (385) esp_image: segment 3: paddr=0x000c0330 vaddr=0x3ffb0804 size=0x02a64 ( 10852) load
I (390) esp_image: segment 4: paddr=0x000c2d9c vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at /home/$USER/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (392) esp_image: segment 5: paddr=0x000c31a4 vaddr=0x40080400 size=0x103e0 ( 66528) load
I (439) boot: Loaded app from partition at offset 0x10000
I (439) boot: Disabling RNG early entropy source...
I (439) cpu_start: Pro cpu up.
I (443) cpu_start: Application information:
I (448) cpu_start: Project name:     native_ota
I (453) cpu_start: App version:      1
I (458) cpu_start: Compile time:     Sep 24 2019 17:00:07
I (464) cpu_start: ELF file SHA256:  0a6742f31ed92caa...
I (470) cpu_start: ESP-IDF:          v4.1-dev-256-g9f145ff16-dirty
I (476) cpu_start: Starting app cpu, entry point is 0x400811a8
0x400811a8: call_start_cpu1 at /home/$USER/esp/esp-idf/components/esp32/cpu_start.c:271

I (0) cpu_start: App cpu up.
I (487) heap_init: Initializing. RAM available for dynamic allocation:
I (494) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (500) heap_init: At 3FFB9888 len 00026778 (153 KiB): DRAM
I (506) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (512) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (519) heap_init: At 400907E0 len 0000F820 (62 KiB): IRAM
I (525) cpu_start: Pro cpu start user code
I (543) spi_flash: detected chip: generic
I (544) spi_flash: flash io: dio
I (544) cpu_start: Chip Revision: 1
W (545) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
I (556) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (570) native_ota_example: SHA-256 for the partition table: : d1c0e9d02fa9d26cd2e1984e7b5dd20157204f501ddc83ce82229e5f3175ee8b
I (610) native_ota_example: SHA-256 for bootloader: : 45023dd7559d14e32c092ca194860ec2dc194a868a0732a21adc19fe41d3c137
I (1210) native_ota_example: SHA-256 for current firmware: : 1066cac678abc8df418abf1d4e62945b1d25624f7be1349fa798f89aac2d261d
I (1260) wifi: wifi driver task: 3ffc1288, prio:23, stack:3584, core=0
I (1260) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1260) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1290) wifi: wifi firmware version: df55612
I (1290) wifi: config NVS flash: enabled
I (1290) wifi: config nano formating: disabled
I (1290) wifi: Init dynamic tx buffer num: 32
I (1290) wifi: Init data frame dynamic rx buffer num: 32
I (1300) wifi: Init management frame dynamic rx buffer num: 32
I (1300) wifi: Init management short buffer num: 32
I (1310) wifi: Init static rx buffer size: 1600
I (1310) wifi: Init static rx buffer num: 10
I (1320) wifi: Init dynamic rx buffer num: 32
I (1320) example_connect: Connecting to Nettra...
I (1420) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0
I (1420) wifi: mode : sta (24:0a:c4:c0:f4:c4)
I (2760) wifi: new:<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (3590) wifi: state: init -> auth (b0)
I (3620) wifi: state: auth -> assoc (0)
I (3630) wifi: state: assoc -> run (10)
I (3660) wifi: connected with mySSID, channel 11, BW20, bssid = 70:3a:cb:24:aa:82
I (3670) wifi: pm start, type: 1

I (4240) tcpip_adapter: sta ip: 192.168.86.33, mask: 255.255.255.0, gw: 192.168.86.1
I (5240) example_connect: Connected to mySSID
I (5240) example_connect: IPv4 address: 192.168.86.33
I (5240) example_connect: IPv6 address: fe80:0000:0000:0000:260a:c4ff:fec0:f4c4
I (5250) native_ota_example: Starting OTA example
I (5250) native_ota_example: Running partition type 0 subtype 0 (offset 0x00010000)
I (7290) native_ota_example: Writing to partition subtype 16 at offset 0x110000
I (7320) native_ota_example: New firmware version: 1
I (7320) native_ota_example: Running firmware version: 1
W (7320) native_ota_example: Current running version is the same as a new. We will not continue the update.
I (7340) native_ota_example: When a new firmware is available on the server, press the reset button to download it
I (7340) native_ota_example: Waiting for a new firmware ... 1
I (9350) native_ota_example: Waiting for a new firmware ... 2
I (11350) native_ota_example: Waiting for a new firmware ... 3
I (13350) native_ota_example: Waiting for a new firmware ... 4
I (15350) native_ota_example: Waiting for a new firmware ... 5
I (17350) native_ota_example: Waiting for a new firmware ... 6
I (19350) native_ota_example: Waiting for a new firmware ... 7
I (21350) native_ota_example: Waiting for a new firmware ... 8
I (23350) native_ota_example: Waiting for a new firmware ... 9
I (25350) native_ota_example: Waiting for a new firmware ... 10
I (27350) native_ota_example: Waiting for a new firmware ... 11
I (29350) native_ota_example: Waiting for a new firmware ... 12
I (31350) native_ota_example: Waiting for a new firmware ... 13
I (33350) native_ota_example: Waiting for a new firmware ... 14
I (35350) native_ota_example: Waiting for a new firmware ... 15
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:6452
load:0x40078000,len:14616
load:0x40080400,len:4240
entry 0x400806dc
I (28) boot: ESP-IDF v4.1-dev-256-g9f145ff16-dirty 2nd stage bootloader
I (29) boot: compile time 17:00:04
I (30) boot: Enabling RNG early entropy source...
I (35) boot: SPI Speed      : 40MHz
I (39) boot: SPI Mode       : DIO
I (43) boot: SPI Flash Size : 4MB
I (47) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (58) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (66) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (73) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (81) boot:  3 factory          factory app      00 00 00010000 00100000
I (88) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (96) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (103) boot: End of partition table
I (107) boot: Defaulting to factory image
I (112) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1f7e4 (128996) map
I (167) esp_image: segment 1: paddr=0x0002f80c vaddr=0x3ffb0000 size=0x00804 (  2052) load
I (168) esp_image: segment 2: paddr=0x00030018 vaddr=0x400d0018 size=0x90310 (590608) map
0x400d0018: _stext at ??:?

I (385) esp_image: segment 3: paddr=0x000c0330 vaddr=0x3ffb0804 size=0x02a64 ( 10852) load
I (390) esp_image: segment 4: paddr=0x000c2d9c vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at /home/$USER/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (392) esp_image: segment 5: paddr=0x000c31a4 vaddr=0x40080400 size=0x103e0 ( 66528) load
I (439) boot: Loaded app from partition at offset 0x10000
I (439) boot: Disabling RNG early entropy source...
I (439) cpu_start: Pro cpu up.
I (443) cpu_start: Application information:
I (448) cpu_start: Project name:     native_ota
I (453) cpu_start: App version:      1
I (458) cpu_start: Compile time:     Sep 24 2019 17:00:07
I (464) cpu_start: ELF file SHA256:  0a6742f31ed92caa...
I (470) cpu_start: ESP-IDF:          v4.1-dev-256-g9f145ff16-dirty
I (476) cpu_start: Starting app cpu, entry point is 0x400811a8
0x400811a8: call_start_cpu1 at /home/$USER/esp/esp-idf/components/esp32/cpu_start.c:271

I (0) cpu_start: App cpu up.
I (487) heap_init: Initializing. RAM available for dynamic allocation:
I (494) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (500) heap_init: At 3FFB9888 len 00026778 (153 KiB): DRAM
I (506) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (512) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (519) heap_init: At 400907E0 len 0000F820 (62 KiB): IRAM
I (525) cpu_start: Pro cpu start user code
I (543) spi_flash: detected chip: generic
I (544) spi_flash: flash io: dio
I (544) cpu_start: Chip Revision: 1
W (545) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
I (556) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (570) native_ota_example: SHA-256 for the partition table: : d1c0e9d02fa9d26cd2e1984e7b5dd20157204f501ddc83ce82229e5f3175ee8b
I (610) native_ota_example: SHA-256 for bootloader: : 45023dd7559d14e32c092ca194860ec2dc194a868a0732a21adc19fe41d3c137
I (1210) native_ota_example: SHA-256 for current firmware: : 1066cac678abc8df418abf1d4e62945b1d25624f7be1349fa798f89aac2d261d
I (1260) wifi: wifi driver task: 3ffc1288, prio:23, stack:3584, core=0
I (1260) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1260) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (1290) wifi: wifi firmware version: df55612
I (1290) wifi: config NVS flash: enabled
I (1290) wifi: config nano formating: disabled
I (1290) wifi: Init dynamic tx buffer num: 32
I (1290) wifi: Init data frame dynamic rx buffer num: 32
I (1300) wifi: Init management frame dynamic rx buffer num: 32
I (1300) wifi: Init management short buffer num: 32
I (1310) wifi: Init static rx buffer size: 1600
I (1310) wifi: Init static rx buffer num: 10
I (1320) wifi: Init dynamic rx buffer num: 32
I (1320) example_connect: Connecting to Nettra...
I (1410) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0
I (1410) wifi: mode : sta (24:0a:c4:c0:f4:c4)
I (2630) wifi: new:<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (3460) wifi: state: init -> auth (b0)
I (3490) wifi: state: auth -> assoc (0)
I (3500) wifi: state: assoc -> run (10)
I (3530) wifi: connected with mySSID, channel 11, BW20, bssid = 70:3a:cb:24:aa:82
I (3530) wifi: pm start, type: 1

I (4240) tcpip_adapter: sta ip: 192.168.86.33, mask: 255.255.255.0, gw: 192.168.86.1
I (5240) example_connect: Connected to mySSID
I (5240) example_connect: IPv4 address: 192.168.86.33
I (5240) example_connect: IPv6 address: fe80:0000:0000:0000:260a:c4ff:fec0:f4c4
I (5250) native_ota_example: Starting OTA example
I (5250) native_ota_example: Running partition type 0 subtype 0 (offset 0x00010000)
I (7330) native_ota_example: Writing to partition subtype 16 at offset 0x110000
I (7370) native_ota_example: New firmware version: 2
I (7370) native_ota_example: Running firmware version: 1
I (9740) native_ota_example: esp_ota_begin succeeded
I (13090) native_ota_example: Connection closed,all data received
I (13090) native_ota_example: Total Write binary data length : 150240
I (13100) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x06504 ( 25860) map
I (13130) esp_image: segment 1: paddr=0x0011652c vaddr=0x3ffb0000 size=0x02098 (  8344)
I (13130) esp_image: segment 2: paddr=0x001185cc vaddr=0x40080000 size=0x00400 (  1024)
0x40080000: _WindowOverflow4 at /home/$USER/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (13140) esp_image: segment 3: paddr=0x001189d4 vaddr=0x40080400 size=0x0763c ( 30268)
I (13170) esp_image: segment 4: paddr=0x00120018 vaddr=0x400d0018 size=0x12cd4 ( 77012) map
0x400d0018: _stext at ??:?

I (13230) esp_image: segment 5: paddr=0x00132cf4 vaddr=0x40087a3c size=0x01dc0 (  7616)
0x40087a3c: ppCalTxAMPDULength at ??:?

I (13240) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x06504 ( 25860) map
I (13260) esp_image: segment 1: paddr=0x0011652c vaddr=0x3ffb0000 size=0x02098 (  8344)
I (13270) esp_image: segment 2: paddr=0x001185cc vaddr=0x40080000 size=0x00400 (  1024)
0x40080000: _WindowOverflow4 at /home/$USER/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (13270) esp_image: segment 3: paddr=0x001189d4 vaddr=0x40080400 size=0x0763c ( 30268)
I (13300) esp_image: segment 4: paddr=0x00120018 vaddr=0x400d0018 size=0x12cd4 ( 77012) map
0x400d0018: _stext at ??:?

I (13360) esp_image: segment 5: paddr=0x00132cf4 vaddr=0x40087a3c size=0x01dc0 (  7616)
0x40087a3c: ppCalTxAMPDULength at ??:?

I (13410) native_ota_example: Prepare to restart system!
I (13410) wifi: state: run -> init (0)
I (13410) wifi: pm stop, total sleep time: 2790383 us / 9882056 us

I (13410) wifi: new:<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1
I (13420) example_connect: Wi-Fi disconnected, trying to reconnect...
E (13430) wifi: esp_wifi_connect 1146 wifi not start
I (13430) wifi: flush txq
I (13430) wifi: stop ESP_ERROR_CHECK failed: esp_err_t 0x3002 (ESP_ERR_WIFI_NOT_STARTED) at 0x4008b878
0x4008b878: _esp_error_check_failed at /home/$USER/esp/esp-idf/components/esp32/panic.c:739

file: "/home/$USER/esp/esp-idf/exsw txq
amples/common_components/protocol_examples_common/connect.c" line 104
func: on_wifi_disconnect
expressionI (13460) wifi: lmac stop hw txq
: 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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6452
load:0x40078000,len:14616
load:0x40080400,len:4240
entry 0x400806dc
I (29) boot: ESP-IDF v4.1-dev-256-g9f145ff16-dirty 2nd stage bootloader
I (29) boot: compile time 17:00:04
I (30) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed      : 40MHz
I (40) boot: SPI Mode       : DIO
I (44) boot: SPI Flash Size : 4MB
I (48) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (59) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (66) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (74) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (81) boot:  3 factory          factory app      00 00 00010000 00100000
I (89) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (96) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x06504 ( 25860) map
I (126) esp_image: segment 1: paddr=0x0011652c vaddr=0x3ffb0000 size=0x02098 (  8344) load
I (130) esp_image: segment 2: paddr=0x001185cc vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at /home/$USER/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (135) esp_image: segment 3: paddr=0x001189d4 vaddr=0x40080400 size=0x0763c ( 30268) load
I (156) esp_image: segment 4: paddr=0x00120018 vaddr=0x400d0018 size=0x12cd4 ( 77012) map
0x400d0018: _stext at ??:?

I (184) esp_image: segment 5: paddr=0x00132cf4 vaddr=0x40087a3c size=0x01dc0 (  7616) load
0x40087a3c: ppCalTxAMPDULength at ??:?

I (194) boot: Loaded app from partition at offset 0x110000
I (194) boot: Disabling RNG early entropy source...
I (196) cpu_start: Pro cpu up.
I (199) cpu_start: Application information:
I (204) cpu_start: Project name:     hello-world
I (210) cpu_start: App version:      2
I (214) cpu_start: Compile time:     Sep 23 2019 16:38:43
I (220) cpu_start: ELF file SHA256:  66d19b480a63439d...
I (226) cpu_start: ESP-IDF:          v4.1-dev-256-g9f145ff16-dirty
I (233) cpu_start: Starting app cpu, entry point is 0x40081018
0x40081018: start_cpu0_default at /home/$USER/esp/esp-idf/components/esp32/cpu_start.c:360

I (225) cpu_start: App cpu up.
I (244) heap_init: Initializing. RAM available for dynamic allocation:
I (250) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (256) heap_init: At 3FFB3080 len 0002CF80 (179 KiB): DRAM
I (263) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (269) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (275) heap_init: At 400897FC len 00016804 (90 KiB): IRAM
I (282) cpu_start: Pro cpu start user code
I (300) spi_flash: detected chip: generic
I (300) spi_flash: flash io: dio
I (301) cpu_start: Chip Revision: 1
W (302) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
I (312) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
Hello world version 2!
This is ESP32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB external flash
Restarting in 10 seconds...
Restarting in 9 seconds...
Restarting in 8 seconds...
Restarting in 7 seconds...
Restarting in 6 seconds...
Restarting in 5 seconds...
Restarting in 4 seconds...
Restarting in 3 seconds...
Restarting in 2 seconds...
Restarting in 1 seconds...
Restarting in 0 seconds...
Restarting now.
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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:6452
load:0x40078000,len:14616
load:0x40080400,len:4240
entry 0x400806dc
I (29) boot: ESP-IDF v4.1-dev-256-g9f145ff16-dirty 2nd stage bootloader
I (29) boot: compile time 17:00:04
I (30) boot: Enabling RNG early entropy source...
I (36) boot: SPI Speed      : 40MHz
I (40) boot: SPI Mode       : DIO
I (44) boot: SPI Flash Size : 4MB
I (48) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (59) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (66) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (74) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (81) boot:  3 factory          factory app      00 00 00010000 00100000
I (89) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (96) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=0x00110020 vaddr=0x3f400020 size=0x06504 ( 25860) map
I (126) esp_image: segment 1: paddr=0x0011652c vaddr=0x3ffb0000 size=0x02098 (  8344) load
I (130) esp_image: segment 2: paddr=0x001185cc vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _WindowOverflow4 at /home/$USER/esp/esp-idf/components/freertos/xtensa_vectors.S:1778

I (135) esp_image: segment 3: paddr=0x001189d4 vaddr=0x40080400 size=0x0763c ( 30268) load
I (156) esp_image: segment 4: paddr=0x00120018 vaddr=0x400d0018 size=0x12cd4 ( 77012) map
0x400d0018: _stext at ??:?

I (184) esp_image: segment 5: paddr=0x00132cf4 vaddr=0x40087a3c size=0x01dc0 (  7616) load
0x40087a3c: ppCalTxAMPDULength at ??:?

I (194) boot: Loaded app from partition at offset 0x110000
I (194) boot: Disabling RNG early entropy source...
I (196) cpu_start: Pro cpu up.
I (199) cpu_start: Application information:
I (204) cpu_start: Project name:     hello-world
I (210) cpu_start: App version:      2
I (214) cpu_start: Compile time:     Sep 23 2019 16:38:43
I (220) cpu_start: ELF file SHA256:  66d19b480a63439d...
I (226) cpu_start: ESP-IDF:          v4.1-dev-256-g9f145ff16-dirty
I (233) cpu_start: Starting app cpu, entry point is 0x40081018
0x40081018: start_cpu0_default at /home/$USER/esp/esp-idf/components/esp32/cpu_start.c:360

I (225) cpu_start: App cpu up.
I (244) heap_init: Initializing. RAM available for dynamic allocation:
I (250) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (256) heap_init: At 3FFB3080 len 0002CF80 (179 KiB): DRAM
I (263) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (269) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (275) heap_init: At 400897FC len 00016804 (90 KiB): IRAM
I (282) cpu_start: Pro cpu start user code
I (300) spi_flash: detected chip: generic
I (300) spi_flash: flash io: dio
I (301) cpu_start: Chip Revision: 1
W (302) cpu_start: Chip revision is higher than the one configured in menuconfig. Suggest to upgrade it.
I (312) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
Hello world version 2!
This is ESP32 chip with 2 CPU cores, WiFi/BT/BLE, silicon revision 1, 4MB external flash
Restarting in 10 seconds...
Restarting in 9 seconds...

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: OTA and Memory partitions

Postby chegewara » Sat Sep 28, 2019 3:13 am

What you see is normal behavior.
My biggest doubt in this is:
I have to add the OTA update code feature in the hello-world code too so I can keep updating (let's say to a hello-world version 3)?
Or is there some way to start the program from the factory partition check for updates and then change to the corresponding OTA to run the main program?
Thats correct, you have to add OTA code to every app, even hello-world, if you want to perform OTA update more than just one time.

Who is online

Users browsing this forum: No registered users and 7 guests