FPGARelated.com
Forums

EDK : *.bit and *.elf Files

Started by Olli ●July 27, 2006
Hello I�m working with the EDK and now I have got a question. At the moment I download the Hardware with the EDK and then I download and start the Software with the debuger. How can I load the Software and Hardware into the Flash, so that I can start run the system without the JTAG chain? With Impact I can only load the Hardware into the Flash and it works. There is an option in the EDK to load the software into the Flash but that doesn�t works fine and I still have to use XMD. I there a possibility to put the *.elf and *.bit file together?

Now my second question: I build a sytem which uses uc/OS II and the Micrium TCP/IP stack and I have got a timing problem. I created an ISR for a module with a little arithmetic operation to measure the time it will take to solve it. It takes around 2us for 5 assembler instructions. Furthermore it takes around 20us to enter the interruptconrollerhandler after the hardware generated the interrupt. Could it be that this problem exits because I use the debugger to run the Software?

I�m using the ML403 evalboard and the Microblaze(100MHz).

I hope somebody can help me.

Cu Olli
Olli wrote:
> How can I load the Software and Hardware into the Flash, > so that I can start run the system without the JTAG chain?
Usually there is an option to create a PROM file instead of a bitstream file. In Xilinx Project Navigator's "Process View", underneath the "Generate Programming File" process is the selection "Generate PROM, ACE, or JTAG File," which I assume is for creating a file to load the serial PROM that contains the design that runs at power on. You may need to change some jumpers in order to program the serial PROM also. Ron
Hi Where do I find the Project Navigator? I'm only working with the EDK and I use Impact to generate an *.EXO file from the EDK *.bit file and I can load my hardware from the flash. My problem is ,that the *.bit file from the EDK only comprised the hardware and not the software. I don�t now how I can create a file which contains the hardware and the software ( my program and a bootloader, which runs my software in the ddr-ram).

Olli
"Olli" <Emperor_@gmx.de> wrote in message news:ee9d396.-1@webx.sUN8CHnE...
> Hello I'm working with the EDK and now I have got a question. At the
moment I download the Hardware
> with the EDK and then I download and start the Software with the debuger.
How can I load the Software
> and Hardware into the Flash, so that I can start run the system without
the JTAG chain? With Impact I can
> only load the Hardware into the Flash and it works. There is an option in
the EDK to load the software into
> the Flash but that doesn't works fine and I still have to use XMD. I there
a possibility to put the *.elf and *.bit
> file together?
There is more than one FLASH memory on ML403. Read some documentation. Basically, you need to create a bootloader application, which can be done with the FLASH programming tool in EDK while writing your main *.elf file into the Linear FLASH. Then you need to update your bitstream with the bootloader elf (this by default will create download.bit file) and then program the Platform FLASH using Impact. /Mikhail
>From some documentation I'm following from Memec.
1. Device Configuration > Download Bitstream (Download a simple Memory Test Project) I can't find it in the documentation at the moment, but I though I read it somewhere that you need to have something initialized in the bram before loading to flash? (this is the reason for this step) I am fairly new to this stuff, so this step may not be needed. 2. Device Configuration > Program Flash Memory a. File to Program = your .elf file b. check the auto cover file to bootable SREC format c. Flash Mem. Properties Instance name = Flash base address d. Scratch Mem. Properties Instance name = DDR base address e. check to creat a flash bootloader application f. click program flash! then ok. 3. You should see a bootloader project come up in your projects window. 4. Make sure your flash is downloaded succesfully. 5. Uncheck your Memory test to be initialized in the bram. 6. Check the bootloader app to be initialized in the bram. 7. Device Configuration > Download Bitstream! Well I'm about to try this. If anything is incorrect someone please correct me! Thanks for your time.
Hi 

      There is more than one FLASH memory >on ML403




I'm using the platform flash 32p

      create a bootloader application Yes I did it already





      while writing your main *.elf file into the Linear FLASH. Then you >need
      to update your bitstream with >the bootloader elf (this by default >will
      create download.bit file) and >then program the Platform FLASH >using
      Impact.




Yes I updated the bitstream with the bootloader and download the hardware with Impact. Thats why I asked the question, it doesn't work ;). I download the *.srec at an high offset and the bootloader was generated automaticly.

Is there an other option?

cu Olli
> I'm using the platform flash 32p
This will be storing your bitstream combined with the bootloader only, the main program will be stored in the linear flash.
> I download the *.srec at an high offset and the bootloader was generated
automaticly. You don't need an offset, as the *.srec gets loaded to a different flash. However, unless the offset is too big for the memory it shouldn't be a problem (provided it was set when you generated the bootloader as well)... /Mikhail
Hi

      This will be storing your bitstream combined with the bootloader only,
      the main program will be stored in the linear flash.




Yes, I saw that on friday too. So I have to download the bitstream with the bootloader in linear flash too.Is that right? In Impact I have only access to the lin. flash over a cpld. When I choose the cpld in Impact to write at, will the *.bit file be stored in the lin. flash?

Thanks for helping me cu Olli
Hi,

The information might not be useful but this may give you clue what&#4294967295;s going wrong...!!

I experienced a problem with Flash Programmer present under Xilinx EDK. When I tried to program SREC through it, the Flash Programmer programs the FLASH on ML403 with SREC, but without parsing..!!!. If I compare the HEX view of my SREC file and the Flash Memory, they are same (something starting like S31&#4294967295;&#4294967295;.) This is wrong..!! The flash programmer should parse the SREC file and program the instructions into the FLASH memory.

The workaround is that you should create a BINARY image of your ELF and program it into FLASH using EDK Flash Programmer. You may need to explore GCC options if the sections of your ELF are scattered.

In order to boot your software from FLASH, you need to modify your bootloader application, to make jump from BRAM to FLASH memory.

- Mateen
"Mateen" <mateen.hasan@yahoo.com> wrote in message
news:ee9d396.6@webx.sUN8CHnE...
> I experienced a problem with Flash Programmer present under Xilinx EDK.
When I tried to program SREC through it, the Flash Programmer programs the FLASH on ML403 with SREC, but without parsing..!!!. If I compare the HEX view of my SREC file and the Flash Memory, they are same (something starting like S31...) This is wrong..!! It's not wrong, it's simply inefficient in terms of using FLASH space. The Xilinx bootloader reads S-records from FLASH and puts the code into SDRAM. /Mikhail