thanks , there is bit there to understand ,

I have some of the same issues in that i need to load code that writes to an external flash chip the data required , clears that code then loads the operational code. would also like to make it robust in that if the load fails it restores the orginal , is this something you allowed for as well ?