02-02-2015 02:38 AM
I'd like to run the Microblaze directly from Flash, unlike the bootloader scenario, (wherein a bootloader running from BRAM fetches the application from Flash and runs it in DDR3). I would like to run an application directly from an SPI Flash. Can you please provide any documents/links for the same?
I have checked the following link:
The procedure seems to be incomplete, and the given procedure looks like the one for a BPI Flash. Thanks.
02-02-2015 03:06 AM
02-03-2015 03:01 AM
The link which you have provided discusses more about the method involving the copying of .ELF from Flash to DDR3, and then executing the application from DDR3 memory. It talks less about direct execution of the application from Flash.
What I would like to know is if the processor can directly execute the application from Flash, without actually loading it to an external memory like DDR3? Thanks.
02-03-2015 05:03 AM
I hope you know realize that you will get very very very slow execution.
The number of cycles to fetch each 32-bit instruction word will be how much slower it will be compared to run from BRAM.
02-03-2015 08:51 PM
I understand that time to run the application from Flash will be much slower than when compared to the application running from DDR3 or BRAM. But, I would be glad if you can provide any inputs on doing the same, i.e., running the application directly from Flash. Thanks.
02-07-2015 02:03 AM
you can keep the read-only sections in flash and run you system.
Refer to this answer record:AR#46503
I have nt tried by keeping all sections in flash. you give a try and let us know.
(Use linker scripts to organise your elf sections in different memories).
(Use mb-objcopy command to create necessary files).
02-08-2015 08:13 PM
I referred your post, and tried out the procedure mentioned in AR46503. However, I'm facing the same error as yours. Program FPGA fails due to errors from elfcheck. I tried increasing the size of BRAM too, but it didn't help.
I shall try by keeping all the sections in Flash, and let you know.
02-09-2015 10:05 PM
There is a work around for the elfcheck problem.
first program FPGA with system.bit + bootloop. Internally, data2mem is used to intialize the brams with bootloop.
now, program Flash with Flash.bin
Finally if you try to program FPGA with system.bit+volatile.elf, elfcheck fails.
Make sure there are sufficient bram available and bypass the elfcheck.
so, by using something like below in commmand prompt you can generate your bit file.
data2mem -bm yourbmmfilelocation -bt yourbitfilelocation -bd locationofvolatile.elf \
tag microblaze_0(checkthisnameinyourbmmfile) -o b \
The generated bitfile can be used to program FPGA using impact.