07-28-2011 05:38 AM
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
08-05-2011 03:16 AM
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:
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!
06-07-2012 10:29 AM
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.
04-01-2013 06:51 AM
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
04-01-2013 10:08 PM
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.
04-02-2013 06:34 AM
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!
07-18-2013 03:41 PM
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.