I'm looking to do remote firmware updates for my project over USB, and I'm having trouble figuring out exactly how this would work. I found the following post on this forum:
https://www.xcore.com/viewtopic.php?f=7&t=286
...and it has a lot of good information, but my slow brain is still missing something. The following app notes are helpful, but incomplete:
AN00154: Using flash memory for persistent storage. This example shows how to read data from a data partition.
AN00185: Boot an xCORE-200 device from QuadSPI flash memory. This app note explains how the xflash tool knows how to program the flash such that the XMOS will load its program from flash. On page 3 of the document, it shows how the flash is formatted in Figure 2. The figure shows:
- A Flash loader (hardware protected)
- A Factory image (also hardware protected)
- Multiple regions labeled as 'Upgrade image'
- A data region
- Write the new image from the running program.
- Reboot.
- If reboot fails, fall back to the previous image.
Thank you in advance,
Jake