[Answered] Small partitions and a concern about write sizes and esptool.
Posted: Thu Apr 26, 2018 11:12 pm
I have a need to manually flash application data into ESP32 flash for use when it runs. Specifically, we have externally generated public and private SSL keys. My initial thinking was to use two separate data partitions. For the sake of some numbers, lets assume that they exist at:
0x20 0000 for 1K
0x20 0400 for 1K
I then got to thinking about using esptool to write data for 1K to 0x20 0000 and a second write of 1K to 0x20 0400
And here is where I started to get wobbly and nervous.
If I flash 1K of data to 0x20 0400 what if I then subsequently flash 1K of data to 0x20 0000 to 0x20 03FF? Do I need to worry about 4K page sizes? Is the unit of a write 4K? Is the 4K from 0x20 0000 to 0x20 0FFF erased before writing starting at 0x20 0000 and hence my data that exists at 0x20 0400 going to be overwritten?
0x20 0000 for 1K
0x20 0400 for 1K
I then got to thinking about using esptool to write data for 1K to 0x20 0000 and a second write of 1K to 0x20 0400
And here is where I started to get wobbly and nervous.
If I flash 1K of data to 0x20 0400 what if I then subsequently flash 1K of data to 0x20 0000 to 0x20 03FF? Do I need to worry about 4K page sizes? Is the unit of a write 4K? Is the 4K from 0x20 0000 to 0x20 0FFF erased before writing starting at 0x20 0000 and hence my data that exists at 0x20 0400 going to be overwritten?