I was wondering if there was a sample or project which can be used for robust in system programming.
The goal is that if programming is interrupted, corrupted, even power loss, that the system can recover.
FPGAs for example have built in circuitry available to boot into a factory image first, and if there were no errors detected on previous boot cycle, change the boot address and boot from a second location. if it succeeds then it runs from this image, if it fails than the factory image is reloaded and this time it sees that there were errors on the previous boot cycle and remains in this image. so for programming as long as we only modify the latest image (not factory image) we can always have it come up and be reprogrammed in our system.
I can think of a way to do this in a micro, but wasn't sure how to do all of the steps needed, and if anything was done already it would be silly to reinvent the wheel.
do you have any guidance? thanks.