Need help with understanding partition

zliudr
Posts: 357
Joined: Thu Oct 03, 2019 5:15 am

Need help with understanding partition

Postby zliudr » Sun Dec 08, 2019 4:38 am

[UPDATE] The main issue has been solved. I increased the length of factory partition from 1M to 2M. But I still wish to understand the partition table more. Any references? Thanks. Hope this post is useful to anyone else encountering the issue.
I've been using this partition table without enough understanding what it does:

Code: Select all

# Name	   Type	 SubType	 Offset	  Size	 Flags
# Note: if you change the phy_init or app partition offset	 make sure to change the offset in Kconfig.projbuild				
nvs	      data	 nvs	     0x9000	  0x6000	
phy_init	 data	 phy	     0xf000	  0x1000	
factory	  app	  factory	 0x10000	 1M	
storage	  data	 spiffs	  	        0xF0000	 
Boot message (repeats):

Code: Select all

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:6392
load:0x40078000,len:11624
load:0x40080400,len:6648
entry 0x40080764
I (29) boot: ESP-IDF  2nd stage bootloader
I (29) boot: compile time 01:20:55
I (29) boot: Enabling RNG early entropy source...
I (33) boot: SPI Speed      : 40MHz
I (37) boot: SPI Mode       : DIO
I (41) boot: SPI Flash Size : 16MB
I (45) boot: Partition Table:
I (49) boot: ## Label            Usage          Type ST Offset   Length
I (56) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (64) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (71) boot:  2 factory          factory app      00 00 00010000 00100000
I (79) boot:  3 storage          Unknown data     01 82 00110000 000f0000
I (86) boot: End of partition table
I (90) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x35f50 (221008) map
I (177) esp_image: segment 1: paddr=0x00045f78 vaddr=0x3ffb0000 size=0x03a50 ( 14928) load
I (183) esp_image: segment 2: paddr=0x000499d0 vaddr=0x40080000 size=0x00400 (  1024) load
I (184) esp_image: segment 3: paddr=0x00049dd8 vaddr=0x40080400 size=0x06238 ( 25144) load
I (203) esp_image: segment 4: paddr=0x00050018 vaddr=0x400d0018 size=0xb09c0 (723392) map
I (457) esp_image: segment 5: paddr=0x001009e0 vaddr=0x40086638 size=0x110fc ( 69884) load
E (486) esp_image: Image length 1055488 doesn't fit in partition length 1048576
E (487) boot: Factory app partition is not bootable
E (489) boot: No bootable app partitions in the partition table
What I have was a WROOM with 16MB SPI FLASH. I didn't have problems with it. I just upgraded to WROVER-B and compiled a few simple test code and that didn't cause any partition issues. I erased the flash once and that didn't solve the problem.
Last edited by zliudr on Wed Dec 11, 2019 4:28 am, edited 1 time in total.


zliudr
Posts: 357
Joined: Thu Oct 03, 2019 5:15 am

Re: Need help with understanding partition

Postby zliudr » Thu Dec 12, 2019 4:46 am

Thanks for the link! I read through it and now understand partitions more. So multiple programs can be placed in their own partition and the bootloader can decide which partition/program to load. I'll read about ota facilities in the future. Does this mean esp32 can receive a new program, write it to its own flash, modify ota partition (flip a switch to which ota partition to execute starting next reboot), and reboot into the new firmware?

Also the possible future support of which partition to run depending on a few GPIO values is appealing. I can develop some similar programs and let jumpers decide what the device will do (which partition to load).

poojagupta20
Posts: 1
Joined: Mon Dec 16, 2019 4:20 pm

Re: Need help with understanding partition

Postby poojagupta20 » Mon Dec 16, 2019 4:30 pm

  1. [Codebox=html5 file=Untitled.html][Codebox=html4strict file=Untitled.html]
[/Codebox][/Codebox]
zliudr wrote:
Thu Dec 12, 2019 4:46 am
Thanks for the link! I read through it and now understand partitions more. So multiple programs can be placed in their own partition and the bootloader can decide which partition/program to load. I'll read about ota facilities in the future. Does this mean esp32 can receive a new program, write it to its own flash, modify ota partition (flip a switch to which ota partition to execute starting next reboot), and reboot into the new firmware?

Also the possible future support of which partition to run depending on a few GPIO values is appealing. I can develop some similar programs and let jumpers decide what the device will do (which partition to load).
Can you help if you got it , like how is the partitioned app decided, like now this has to be used or other app needs to be used?

Who is online

Users browsing this forum: No registered users and 122 guests