Hi,
I'm bringing up a project using a Spartan II, PIC16F18325 to control boot and various other system stuff and a 1MB external SPI flash. So far, so good - test FPGA bitstreams over JTAG work, PicKit3 can talk to the PIC and the PIC can talk to the flash. So far, only one green wire. My plan is to put the FPGA bitstream (potentially compressed) into the flash, use the PIC to boot the FPGA using slave serial, then turn the programming interface around and use it to allow the FPGA to talk to the PIC at runtime. I'm going to store additional data in the unused flash past the end of the bitstream.
Now I'm stuck at getting the initial bitstreams into the flash. I was hoping that I'd be able to get a simple bootloader into the PIC then use the ICSP interface or PicKit to tunnel data into the flash, but I can't figure out if that's even possible. With a script of some kind, it would be. For example, I could download the bootstrap program to the pic, and enter a loop with a breakpoint at the top. In each iteration of the loop, it'd hit the breakpoint, the debugger would write a page of data (256 bytes) to PIC's RAM, and when the breakpoint was released, the PIC would program the data into flash from RAM.
Does anyone have any tips for writing such a thing? Anyone got a better idea? Adding more programming headers or programming the flash before assembly aren't really options, unfortunately.