EDK : *.bit and *.elf Files

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

Reply to
Olli
Loading thread data ...

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

Reply to
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

Reply to
Olli

moment I download the Hardware

How can I load the Software

the JTAG chain? With Impact I can

the EDK to load the software into

a possibility to put the *.elf and *.bit

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

Reply to
MM

  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.

Reply to
Kyle H.

I couldn't find it in the doc. I was reading (anyways) because it's on the Program Flash Mem. window down at the bottom. Must have an EMC peripheral connected to the flash prior to flash download!

EMC?

Reply to
Kyle H.

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

Reply to
Olli

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

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

Reply to
MM

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

Reply to
Olli

Hi,

The information might not be useful but this may give you clue what?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??.) 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

Reply to
Mateen

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

Reply to
MM

No, you have to put it into the Platform Flash. If you put it into the linear flash the FPGA won't be able to read it on power-up by itself meaning that an external microcontroller of some sort would be required. I am not sure if this option has been designed in the ML403's CPLD. Check the documentation, it might be possible.

the

flash?

No. In Impact you have direct access to Platform Flash. Forget about the CPLD for now. The Platform Flash can be programmed from XPS with Device Configuration/Download Bitstream as well, but for better understanding of what you are doing I would recommend using Impact.

To program the Linear Flash you have to go to Device Configuration/Program Flash Memory in XPS.

/Mikhail

Reply to
MM

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.