upload binary image more than 1MB

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: upload binary image more than 1MB

Postby snahmad75 » Tue May 08, 2018 2:05 pm

Sorage of 1M works with factory works. This partition works.

# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 0x1f0000
storage, data, fat, ,0x80000

but not below partition with OTA

# Name, Type, SubType, Offset, Size
nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
ota_0, app, ota_0, 0x10000, 0x177000
ota_1, app, ota_1, , 0x177000
storage, data, fat, ,1M

Now I reduce my ota partition size to 1500kb.

Any idea why?

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: upload binary image more than 1MB

Postby ESP_Angus » Wed May 09, 2018 2:19 am

snahmad75 wrote:Sorry bother again.
Does remove of factory partition effects flash encryption?

Can I still use encrypted .bin.
Yes. Flash encryption applies to all "app" partitions, whatever type they are (OTA, factory, or test). The bootloader will treat the first OTA slot as equivalent to the factory partition, if no factory partition is found.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: upload binary image more than 1MB

Postby ESP_Angus » Wed May 09, 2018 2:41 am

chegewara wrote:Maybe someone smarter than me can confirm that, but if i recall minimum storage data partition is 1MB.
Data partitions can be as small as 4KB (1 flash erase unit), but FATFS itself has some limits for minimum filesystem size.

With the default 4096 byte sector size, the minimum filesystem size is a little more than 512KB (I think approx 520KB). We will add the exact limitation to the docs.

If you want to support smaller FAT filesystems stored in flash, you can change the Wear Levelling sector size configuration item to 512 byte sectors:
http://esp-idf.readthedocs.io/en/latest ... ector-size

(Note that any data written with the 4096 byte sector size will be invalid after changing the sector size.)

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: upload binary image more than 1MB

Postby snahmad75 » Wed May 09, 2018 8:30 am

What is minimum filesystem size when sector size is 512 bytes?

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 286 guests