UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor giray
Visitor
11,097 Views
Registered: ‎08-05-2008

Setting Elf File Association

Hello Everyone,

 

I have searched the topic but find no full response so opened new topic. I am newbie for Xilinx EDK, SDK and Microblaze. The problem is that after generating the hardware, exporting to SDK and compiling the C code, SDK generates an .Elf file. I assume that the Elf file should initiate the instruction block ram. Unfortunately, I cannot associate the elf file with the hardware. Neither in EDK Project Files, nor in the ISE XMP/ELF File Associations window.

Now the question: How can I download this Elf file into FPGA?

 

Thanks in advance

 

Xilinx Version: 13.2

Target Device: Spartan 3E FPGA Starter Kit from Digilent

0 Kudos
8 Replies
Visitor faber
Visitor
11,057 Views
Registered: ‎04-16-2008

Re: Setting Elf File Association

Hi, I have the same problem which seems to be connected to the lack of a menu item in EDK which allows the user to set the elf file for the project.

You can workaround this problem in some ways:

1) you can download the bit file to the FPGA and then load the application from SDK;

2) in SDK you can choose "Xilinx Tools > Program FPGA" menu item, select the .bit, the .bmm, and the .elf file: the SW will merge into a .bit file (typically download.bit) which contains both HW and appplication; if your EDK design is a submodule of a ISE design, select in the project navigator the EDK component and in the process window select "Export HW design to SDK with Bitstream": in this way everything is correctly synchronized

3) This is not hortodox but, for me, the best solution: edit the .XMP file and add a line like the following:

ElfImp: "elf_file_name_with_path"

Typically "elf_file_name_with_path" is something like: SDK/YourAppName/Release/YourAppName.elf

Then, magically, also in the ISE Project Navigator everything will work fine and you'll find the "Xmp/elf association" working!

good luck

 

0 Kudos
Highlighted
Contributor
Contributor
10,805 Views
Registered: ‎06-07-2012

Re: Setting Elf File Association

Hi,

 

I add the same problem and your message helped me find the solution.  Search Xilinx web site for "xelf_add" tcl command.  That is the clean way to associate a elf with a microblaze subsystem. ISE will automagically recognize the .elf and bitgen will update the content of the BRAM with the program.  This command effectively adds the line in the .XMP like described previously in this thread.

 

jf

Tags (1)
0 Kudos
Voyager
Voyager
10,773 Views
Registered: ‎04-10-2012

Re: Setting Elf File Association

Do you have a link?  I couldn't find anything on the site.  Thanks.

0 Kudos
Newbie csanborn
Newbie
10,356 Views
Registered: ‎04-01-2013

Re: Setting Elf File Association

 

Still no clear solution here.  I am using 14.4 ISE and from a working project I can create a TCL script using the GUI.  Then delete the project and use the TCL script to create it again.  The Elf file is not correctly associated with the processor in implemetation or simulation and the compiled bit file loads the fabric, but the processor does not run.

 

Is there a command to associate the elf file in TCL??

 

I am using Virtex 4, power PC, windows 7, ISE 14.4

0 Kudos
Mentor hgleamon1
Mentor
10,349 Views
Registered: ‎11-14-2011

Re: Setting Elf File Association

If you are using ISE (Project Navigator) you can simply add the ELF file as a source just like any other source file. The tools will automatically associate it with your XMP instance. A dialogue will pop up, like it does for all sources, where you can choose if the ELF is for simulation, implementation or both. I have not tried this with multiple MicroBlaze systems but I shall assume that, for the most part, this doesn't matter.

 

If you are using XPS directly, you can choose Project -> Select ELF file from the menu and make the association for your processor for either simulation or implementation.

 

Certainly true for tools version 13.4.

 

Regards,

 

Howard

 

----------
"That which we must learn to do, we learn by doing." - Aristotle
Voyager
Voyager
10,339 Views
Registered: ‎04-10-2012

Re: Setting Elf File Association

Eureka, that seems to work like a champ in 14.2.  I am not sure how in all of my searching I never stumbled upone someone saying to do that.  Thank you!

0 Kudos
Newbie csanborn
Newbie
10,015 Views
Registered: ‎04-01-2013

Re: Setting Elf File Association

 

Still no solution for TCL script.  ( I understand the orignial question has been answered, but not using a TCL script)

 

Is this an oversite in Xilinx tools?

 

You should be able to recreate the problem following these steps:

I did this using ISE 14.4

 

Open a project, remove the elf file.

Add a new elf file, but do not associate the file.

Create a tcl script using tool:  Project -> Generate Tcl Script...

Then assocaite the elf file using the steps mentioned above in ISE.

Create another TCL script with a different name.

Compare the two files and other than the filename included within, the files are identical.

Using the script to compile the image, it does not include the elf file for the processor to run.

 

In my case this makes the tcl file useless for building my prom images.

 

Please advise with a method to set the elf assocaition in a tcl script.

Thanks,

 

 

0 Kudos
Explorer
Explorer
9,963 Views
Registered: ‎07-28-2008

Re: Setting Elf File Association

 right answer for 13.3 as well.

0 Kudos