New Data Partition In Upgrade Image

Technical questions regarding the XTC tools and programming with XMOS.
RitchRock
XCore Addict
Posts: 224
Joined: Tue Jan 17, 2017 9:25 pm

New Data Partition In Upgrade Image

Post by RitchRock »

My factory image includes a data partition. I can't seem to create an upgrade image with a new data file for the partition. Is this possible? If not I guess the new data should get programmed in the partition the first time the upgrade image is run, so the new data should be stored in firmware.
RitchRock
XCore Addict
Posts: 224
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

Bumping this question..
markp
Verified
Member++
Posts: 26
Joined: Thu Jan 10, 2019 6:07 pm

Post by markp »

The data partition is independent of the factory image and upgrade images. It resides at the top off the flash memory array. The factory image lives at the bottom, with upgrade images sitting above this (and below the data partition).
RitchRock
XCore Addict
Posts: 224
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

Hi, yes I am aware of this. I was wondering if there was a way to include a replacement data partition, bundled with an upgrade image. Anyway, I included the new data partition in my code and created a version control mechanism for the data partition, which seems to be working ok.
User avatar
Ross
Verified
XCore Legend
Posts: 1158
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

You could program a DFU system to upgrade the data partition, flashlib provides an API for writing to it.

If you have multiple images (say a factory and an upgrade) then you would want a system for multiple data partitions. Both to protect from failed upgrades and because you probably don't always want to make sure the data sections remain compatible between images. Then you'd probably want some sort or error checking, of course, and then fall back to the factory version on error detection etc etc. I guess it depends how critical the stored data is to the operation of the device... and if you want the data to be editable in mission mode.

I think your solution is safer/easier as you get all this for "free" by including the data in the images.
Technical Director @ XMOS. Opinions expressed are my own