bram can't store elf

Hi, I'm new to using the EDK and need some help.

I'm working on a microblaze system which has become to big for the BRAM, and having done some research i realise i need a bootloader.

What i have made out from the scraps of information i've read is:

1) Create a new software project which is the bootloader, this simply points to the external memory and says to the system, run this code. 2) program the FPGA as normal, with the bootloader program. 3) load data onto the external memory. 4) It should work.

So my first question is, have i understood the principles correctly?

Moving on from here i've been struggling to find any detailed tutorials/explinations about how to actually do this. Could someone either explain to me or point to a good tutorial?

One more point, when i program my FPGA, i don't directly program the FPGA, i program a device which then with every boot of the development board programs the FPGA. I have a feeling this will affect the steps above(if they are correct in the first place) because i don't want to be manually loading data onto the external memories every time i start the thing running. My availible external memories are a DDR and a flash.

Thanks in advance

Reply to
dan
Loading thread data ...

It sounds like you have most of this understood. Your bootloader will live "inside" the FPGA bitstream and setup the BRAM that the microblaze will boot from. This bitstream will (probably) live in a configuration flash, or in your program flash in a different sector to the proper software. What configuration strategy are you using? Which FPGA?

You'll then have to get your "proper" program into flash in some way and then the boot code can either jump straight to execute from flash (if you're lucky that'll execute quick enough for your application) or copy it into DDR at boot time and then execute from DDR.

Cheers, Martin

--
martin.j.thompson@trw.com 
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
Reply to
Martin Thompson

Thanks Martin.

I am using a virtex 4 sx35.

There are some specific details i am unsure of maybe you can help with.

The development board i am using has a CPLD which connects to a flash memory and the FPGA, when i have new code i connect to the CPLD and upload it to the flash. With every boot of the developement board the CPLD then programs the FPGA with the code i have previously uploaded. I also have another flash memory(completely seperate from this programming interface) and a DDR.

I can load my project with the bootloader application onto the board, run it and i get various error messages(throuhgh the RS232) because i have not loaded the main program. Now here comes the problem. The bootloader is trying to copy data from the 4MB flash to the DDR then run it,

1) how do i get the real program into the 4MB flash? It seems that i should be able to set this up as part of the hardware within the project but i can't find a way of "initialising" the memories. 2) tutorials i've been reading tell me to use the "program flash memory" option in the EDK, but this causes me a problem. From what i can make out, loading data to the flash in this way requires the hardware part of the project to be loaded on the FPGA already, does this mean when loading data to the flash i am interacting directly to the FPGA with the hardware part of the project? When i program my FPGA as i mentioned earlier i don't interact with it at all but instead interact with it via a CPLD. Can you see my problem? more importantly....can you see my answer?

I hope you have time to answer.

Thanks

Dan

Reply to
dan

What is this bootloader application? Is that on the PC or the FPGA?

Flash is a bit different in the way it has to be written to - you have to erase a whole block and then write it all at once.

You have to have the processor and all it's peripherals already running in the FPGA. When you do a "program flash" it loads a small program into the processor and that then programs the flash. You must have a supported flash configuration for htis to work, otherwise you're on your own :-( It's not that hard though! You just have to read the flash datasheets carefully.

If you open the EDK helpfile and search for "flash" and then click "programming flash memory", there's a detailed guide, which also leads onto a reference to Embeddeed System Tools Reference Manual which has a chapter on flash programming...

While I wait for another PAR run to complete :-)

Cheers, Martin

--
martin.j.thompson@trw.com 
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
Reply to
Martin Thompson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.