cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Anonymous
Not applicable
6,857 Views

ELF file not embedded in MCS file

Jump to solution

Dear all,

 

I've searched through many different posts about FPGA configuration, MCS file generation, embedding ELF files and so forth within the forum and Google and I think I hit a dead end for my problem - so this is why I'm finally asking you guys for help.

 

My setup:

I am working on an EDK Microblaze project with a Trenz Electronic GigaBee XC6SLX Series Board (Spartan-6 XC6SLX150) interfacing with a WinBond W25Q64BV Flash memory (64Mbit) using Quad-SPI. In order to automatically configure the FPGA on start-up I am using an ELF bootloader to copy the executable from the Flash memory to the onboard DDR memory. So far so good.

 

What I've done so far:

  • As the application was small enough I already worked out how the configure the FPGA from Flash solely using the BRAM - so I got the tool chain from EDK - SDK - iMPACT working.
  • Now, that the application does not fit within the BRAM anymore, I have an ELF bootloader in place that uses the Quad-SPI interface to copy the data from Flash to DDR. This bootloader is embedded in the configuration bitstream using EDK (update bitstream).
  • I use the iMPACT 14.6 GUI (SPI Flash - Configure Single FPGA) to generate a MCS file in order to perform the progamming of the WinBond flash memory. Using that, I made sure to check the "Add Non-Configuration Data Files" option in the iMPACT wizard. The ELF file is added at offset of 0x500000.
  • Hitting "Generate File ..." produces "Generate Succeeded" and the corresponding MCS file.
  • Within the Boundary Scan menu I configure my external SPI flash accordingly and program the flash without any errors.
  • After configuration the bootloader executes (DDR testing successful, Quad-SPI initialization successful) and tries to find the ELF magic number to start copying to DDR ... and finds nothing.
  • I debugged the bootloading process and checked for the data read at the corresponding offset --> 0xFFFFFFFF (empty)

Now I wondered why the ELF magic number is not found ...

 

I checked the generated MCS file and tried to locate the beginning of the ELF file manually ... nothing.

 

I tried to use PROMGEN from the command window and I noticed several errors popping up "INTERNAL_ERROR::45 - Memory allocation leak of xxx Bytes found at xxx for 'xxx' data."

 

I compared the generated MCS file with and without the added ELF file and found no difference at all - which led me to the conclusion the the ELF file is simply not where it should be - or at least not where I thought it should be!

 

My questions:

  • What's all about the "INTERNAL_ERROR::45" error messages?
  • Why are there no errors using MCS file generation within the iMPACT GUI?
  • Where's my ELF file going?
  • What am I doing wrong here? Any ideas?

Any help would be really appreciated.

 

Thank you for your time,

  Thomas

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Anonymous
Not applicable
9,206 Views

Hi,

 

I've also posted this topic to the Trenz Electronic Forum, which led me to a statisfying solution:

 

Maybe someone finds this useful in the future:

http://forum.trenz-electronic.de/index.php/topic,332.msg1144.html#msg1144

 

Best Regards,

  Thomas

View solution in original post

0 Kudos
7 Replies
Highlighted
Anonymous
Not applicable
6,843 Views

I have attached a doc that you can follow that shows what you are trying to achieve

0 Kudos
Highlighted
Anonymous
Not applicable
6,836 Views

Hello,

 

thank you for the document - I already had a look at this one before.

 

The document assumes design files for the KC705 board - these design files are not included with my Xilinx installation. I am using ISE Design Suite 14.2.

 

Where can I get them? The only interesting thing is the bootloader referred to in the document.

 

Why do they split the ELF file into two separate BIN files? (I know their bootloader requires it - but why).

 

Your post doesn't really answer my questions, but could be a potential solution to my problem.

 

Best Regards,

  Thomas

0 Kudos
Highlighted
Anonymous
Not applicable
6,820 Views

Hi,

 

I also noted the following when executing the "promgen" command stated as follows:

promgen -w -p mcs -c FF -o <outputMCSfile> -s 8192 -u 0000 <BITfile> -bd <ELFfile> start 500000 -spi

 

ERROR::6 - Illegal token '(', 'ADDRESS_RANGE' expected.
(null)END_ADDRESS_SPACE;

 

Any idea where this error orginates from?

 

After ERROR::6 the command window shows writing to the output files and then continues with the INTERNAL_ERROR::45 statements.

 

Best Regards,

  Thomas

 

 

0 Kudos
Highlighted
Anonymous
Not applicable
6,813 Views
The elf is split into the vectors (at 0x0) and the rest (at DDR base address) because the obj copy tool will pad the jump between the vector and the rest if the sections with 0's. So if your DDR base addr is at 0x800000000 then you will end up with a bin file that is~4GB
0 Kudos
Highlighted
Anonymous
Not applicable
6,779 Views

Hi,

 

I'd really like to follow the instructions within the document you mentioned - but again, I don't have access to the related bootloader in this document - where can I get the design files for the KC705 board?

 

Thanks

0 Kudos
Highlighted
Anonymous
Not applicable
6,750 Views

Nobody?

 

It's really frustrating, since FPGA configuration / bootloading is something everyone has to be concerned about in one way or another - I'm aware that there is a manifold of ways to accomplish that, but still this can't be such a hard part to overcome.

 

Maybe there's someone out there with a solution ... I'm still trying to get it working. If I'm successful I'll post my results for reference.

0 Kudos
Highlighted
Anonymous
Not applicable
9,207 Views

Hi,

 

I've also posted this topic to the Trenz Electronic Forum, which led me to a statisfying solution:

 

Maybe someone finds this useful in the future:

http://forum.trenz-electronic.de/index.php/topic,332.msg1144.html#msg1144

 

Best Regards,

  Thomas

View solution in original post

0 Kudos