Adding nvs partition without physical UART connection to hardware

ICONDev
Posts: 9
Joined: Mon Oct 22, 2018 2:12 pm

Adding nvs partition without physical UART connection to hardware

Postby ICONDev » Wed May 22, 2019 3:20 pm

Hello,
currently we are using a custom partition table with 2 ota partitions. The initial factory load, containing boot loader, partition table and App is flashed through Uart/ USB.
After that point ot time, the customers get updates through ota, we have no physical access through the UART interface anymore without unmounting the hole thing..) So far so good...

Our Problem:
We would like to roll out a new update which requires a new 4MB partiton for a spiffs. (we have space enough at the end of the existing table). No problem for new systems were the csv partition table already contains the required partition.. But the existing systems does not have this required partition.

This is why we cannot update the systems in the field without accessing through the UART interface..

Is there an alternative way to add a partition to an existing partition table (which should come after the used partitions) e.g. through runtime (maybe calling once a magic function) or with ota?
Or is the only way to have physical access to the hardware and reflash the hole thing?

thanks.
Juergen

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: Adding nvs partition without physical UART connection to hardware

Postby ESP_Sprite » Thu May 23, 2019 1:51 am

The only safe way is to have physical access. The issue is that the partition table is something that only has one copy in flash, and if something happens while you're re-writing it (e.g. power loss), your device is bricked.

If you still want to do it, you can possibly use the raw flash functions to copy one over, but as I said, this is not without risk.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Adding nvs partition without physical UART connection to hardware

Postby WiFive » Thu May 23, 2019 5:02 am

You could modify spiffs component to use raw flash addressing instead of partitions

Who is online

Users browsing this forum: No registered users and 147 guests