FX3 firmware switching at runtime | Cypress Semiconductor
FX3 firmware switching at runtime
I'm aware of the USB fallback option when booting from SPI Flash. I have sucessfully created Firmware images with the ELFtoIMG util. I managed to programm these images into Flash width Cypress USB Control Center and boot those images.
Now I want to accomplish something "different". Imagine the following scenario:
1) I programmed 2 valid firmware images into the SPI Flash each image occupies about 4 sectors (256K).
2) The FX3 Bootloader finds the first image and boots from it.
3) The first image completely replaces itself (Code, Data, everything) with the second image at runtime.
Is that possible? What would be a suitable approach to do it?
My first idea was to reinvoke the FX3 Bootloader somehow with a modified SPI read address, so that it loads the second image and hands over control to it, maybe doing a warm boot in the process.
Or do I have to make the frist firmware overwrite itself Byte by Byte in memory and start executing from it?
Thanks in advance.