Coming from the world of MCUs, I create bootloaders so that customers can update the firmware. Specifically, i'm talking about a USB bootloader to narrow down the many different mediums.
How is this done with FPGAs and CPLD. I would prefer a solution that is secure. So the image sent is encrypted or obfuscated some how. But I would like to here solutions that are not as well.
Since the firmware is stored in external flash memory, does the FPGA image just write to it's external flash and then restart? But what happens if the new file is corrupt or the connection is removed while updating? Is there a way to make a default backup? In MCUs, the bootloader is never overwritten so the application can mess up anytime and the bootloader will still work.
Is there a separate dedicated non-volatile memory portion that is not re-configured on power up that you can load a bootloader in?
Since the image is stored internally, do they have a way to configure themselves? How would one make a bootloader for a CPLD?
Maybe you can put an FTDI chip of some sort with GPIO that you can control from a PC app via USB. This way you can bitbang an SPI to load in a new image on the external flash? Anybody do that? That way the FPGA image can be corrupt or missing and still will be able to load a new image.
Note that i'm assuming that the FPGA or CPLD is alone on a board. Meaning there is not an MCU on the board to do all this.
Any insight as to how the industry achieves this task would be great.