cesanta / mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
https://mongoose-os.com
Other
2.48k stars 430 forks source link

feat(esp32): added option to add partition before app_0 #592

Open daadu opened 2 years ago

daadu commented 2 years ago

Some use-case for having partition before app_0:

daadu commented 2 years ago

Any update on this? should be renamed to ESP_IDF_EXTRA_PARTITION_BEFORE_APP ??

rojer commented 2 years ago

storing factory data at fixed offset irrespective of flash size

ok, i understand the need. but there's still one problem here: the NVS size. if it ever needs to be changed, for whatever reason, it's a problem. so, let's move it to the very top, even before nvs and OTA state, and call the variable something else... ESP_IDF_EXTRA_PARTITION_TOP, perhaps, but if you have a better name - feel free.

daadu commented 2 years ago

If we move this "extra part" at top - then if some one wants to configure it, he has to shift all three default offsets - NVS_ADDR, OTA_DATA_ADDR and APP_OFFSET. In current case only have to shift APP_OFFSET.

Maybe can keep this as well as add "TOP" one?

daadu commented 2 years ago

Or do you think this "shifting" should be handled by MGOS? That is a bit non-trivial - as have make sure that the offset is "aligned" as per ESP spec.