03-18-2009 03:31 AM
I have a microblaze design with an external 1 MB serial flash connected to MB CacheLink
interface to function as an instruction cache.
I would like to execute a simple program directly from the flash, is this possible?
I convert the .elf to .bin which is then written to flash and then try to jump at the
base address of the flash to execute from there. With Chipscope I see MB reading
from the flash and the values are correct but it never works - it's a simple program, a printf() !
I read in a post thatI need a custom linker script when compiling that program?
Any help greatly appreciated,
03-19-2009 07:48 AM
I don't think the example is applicable for serial flash. This answer assumes parallel Flash. Notice the instruction to use the "Program Flash Memory" command from within XPS, which I believe is only for parallel Flash connected to an EMC peripheral. I'm not aware of any examples that show how to execute from serial Flash.
If you want to try parallel Flash, an implementation was done on the Avnet Spartan-3A Evaluation Board. Go to www.em.avnet.com/spartan3a-evl --> Support Files & Downloads --> MicroBlaze Parallel Flash Test and Execute in Place.
03-20-2009 10:15 AM
This app note may be more helpful:
http://www.xilinx.com/products/boards/s3a_sd1800a_ref_designs/xapp1053.pdf (Flash Memory Bootloading Using SPI with Spartan-3A DSP 1800A Starter Platform)
I think that is the best place to start, but I'll also mention some othe resources I had cached:
http://www.xilinx.com/support/documentation/application_notes/xapp1106.pdf (Using and Creating Flash Files for the MicroBlaze Development Kit - Spartan-3A DSP 1800A Starter Platform)
http://www.xilinx.com/support/documentation/application_notes/xapp978.pdf (FPGA Configuration from Flash PROMs on the Spartan-3E 1600E Board)
http://www.xilinx.com/support/documentation/application_notes/xapp963.pdf (Using and Creating Flash Files for the MicroBlaze Development Kit - Spartan-3E Edition)