Custom OTA partion table (without factory app) => wrong app infos

achim.friedland
Posts: 2
Joined: Fri Jun 04, 2021 11:53 pm

Custom OTA partion table (without factory app) => wrong app infos

Postby achim.friedland » Sat Jun 05, 2021 12:14 am

Hi,

I created a custom partition table, just having two OTA partitions and no factory partition.

This is partitions.csv

Code: Select all

otadata,data,ota,0x9000,8K,
phy_init,data,phy,,12K,
nvs_key,data,nvs_keys,,8K
ota_0,app,ota_0,0x10000,1M,
ota_1,app,ota_1,,1M,
spiffs,data,spiffs,,1536K,
nvs,data,nvs,,383K,
coredump,data,coredump,,64K,
Building, flashing, running is all fine... BUT I noticed, that the app infos shown during boot and which I can access via

Code: Select all

const esp_app_desc_t *app_desc = esp_ota_get_app_description();
are now no longer updated. I still can change the code, recompile and flash it and it does something different.

Code: Select all

[...]
I (30) boot: compile time 01:45:26
[...]
I (494) cpu_start: App version:      05ce6f4-dirty
I (499) cpu_start: Compile time:     Jun  5 2021 01:45:18
I (505) cpu_start: ELF file SHA256:  09b9343727f0ecc6...
[...]
Update: I found out, that the "App version" is taken from 'git describe --always --tags --dirty'. Is it possible, that the "Compile time" is also "just" the time of the last "git commit"?

Code: Select all

I (30) boot: ESP-IDF v4.2-dirty 2nd stage bootloader
I (30) boot: compile time 01:45:26
I (31) boot: chip revision: 1
I (34) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (41) boot.esp32: SPI Speed      : 40MHz
I (45) boot.esp32: SPI Mode       : DIO
I (50) boot.esp32: SPI Flash Size : 4MB
I (54) boot: Enabling RNG early entropy source...
I (60) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (71) boot:  0 otadata          OTA data         01 00 00009000 00002000
I (78) boot:  1 phy_init         RF data          01 01 0000b000 00003000
I (86) boot:  2 nvs_key          NVS keys         01 04 0000e000 00002000
I (93) boot:  3 ota_0            OTA app          00 10 00010000 00100000
I (101) boot:  4 ota_1            OTA app          00 11 00110000 00100000
I (108) boot:  5 spiffs           Unknown data     01 82 00210000 00180000
I (116) boot:  6 nvs              WiFi data        01 02 00390000 0005fc00
I (123) boot:  7 coredump         Unknown data     01 03 003efc00 00010000
I (131) boot: End of partition table
I (135) boot_comm: chip revision: 1, min. application chip revision: 0
I (142) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1ea64 (125540) map
I (199) esp_image: segment 1: paddr=0x0002ea8c vaddr=0x3ffbdb60 size=0x0158c (  5516) load
I (202) esp_image: segment 2: paddr=0x00030020 vaddr=0x400d0020 size=0x84628 (542248) map
I (412) esp_image: segment 3: paddr=0x000b4650 vaddr=0x3ffbf0ec size=0x01f30 (  7984) load
I (416) esp_image: segment 4: paddr=0x000b6588 vaddr=0x40080000 size=0x00404 (  1028) load
I (419) esp_image: segment 5: paddr=0x000b6994 vaddr=0x40080404 size=0x16378 ( 91000) load
I (480) boot: Loaded app from partition at offset 0x10000
I (480) boot: Disabling RNG early entropy source...
I (480) cpu_start: Pro cpu up.
I (484) cpu_start: Application information:
I (489) cpu_start: Project name:     XXXXXXX
I (494) cpu_start: App version:      05ce6f4-dirty
I (499) cpu_start: Compile time:     Jun  5 2021 01:45:18
I (505) cpu_start: ELF file SHA256:  09b9343727f0ecc6...
I (511) cpu_start: ESP-IDF:          v4.2-dirty
I (516) cpu_start: Starting app cpu, entry point is 0x4008198c
I (0) cpu_start: App cpu up.
I (527) heap_init: Initializing. RAM available for dynamic allocation:
I (534) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (540) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (546) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (552) heap_init: At 3FFC8A60 len 000175A0 (93 KiB): DRAM
I (558) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (565) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (571) heap_init: At 4009677C len 00009884 (38 KiB): IRAM
I (577) cpu_start: Pro cpu start user code
I (595) spi_flash: detected chip: generic
I (596) spi_flash: flash io: dio
I (596) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (604) NVM: Setting up NVM...
I (604) system_api: Base MAC address is not set
I (614) system_api: read default base MAC address from EFUSE
I (744) NVM: The device is not initialized yet!
I (744) NVM: Setup finished!
Is there something wrong with the partion table? As far as I have read the documentation it should be fine to have just two OTA partitions, without the factory partition.

Who is online

Users browsing this forum: No registered users and 195 guests