It was tricky but now we can do it. We have now a program that downloads an image to write on the FPGA fabric.
Initially the approach was to write using the UART to download the image but it seemed that this could take more time to develop than intended initially so the approach was changed to another were we compress the image and store in the MSS RAM.
One problem with this approach is that the compressed image might be bigger than the amount of memory that the MSS RAM can hold, so this may require segmentation of the FPGA image (it is still not yet verified if the image can be bigger than that). Another problem is that the binary that programs the image in the FPGA has to be relinked to the image, which needs to be loaded to the MSS again. This problem can be overcame by downloading the image to the MSS RAM, without relinking it to the application that flashes it to the SPI flash, then writing the image to the SPI flash memory.
Another problem to deal with is that this was tested only on the SmartFusion eval board, and the eval board uses a flash memory that is different from that of the Tutobot. Since that SPI flash has a compatible instruction set, we expect that it will work with having to fix it.
Possibly related posts: