cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
usman1818
Observer
Observer
4,274 Views
Registered: ‎10-12-2016

merge .elf and .bit files (tools: vivado and SDK)

Hi,

 

I am working on nexys-4(artix-7) board. I create my design in vivado 2016.3, export it to sdk and run my application. All is running perfectly. Now I want to run my sdk application at start-up, so I went through the following document(page 50) and proceed step by step to merge elf and bit files. But its not merging.

https://www.xilinx.com/support/documentation/boards_and_kits/vc707/2015_1/xtp205-vc707-bist-c-2015-1.pdf

 

The only difference is the version of vivado. Anybody has any idea about it?

 

Regards

Usman

 

 

0 Kudos
5 Replies
balkris
Xilinx Employee
Xilinx Employee
4,237 Views
Registered: ‎08-01-2008

check these posts
https://forums.xilinx.com/t5/Embedded-Development-Tools/How-to-get-bit-and-elf-into-the-same-Flash/td-p/152444
https://forums.xilinx.com/t5/Embedded-Development-Tools/can-sdk-elf-and-bit-download-FPGA-together/td-p/202393
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
kkn
Moderator
Moderator
4,180 Views
Registered: ‎01-15-2008

hi Usman,

 

when merging the .elf with the .bit file to create mcs check the bit/byte swapping details for the elf which might be required

 

https://www.xilinx.com/support/answers/36210.html

 

--Krishna

0 Kudos
usman1818
Observer
Observer
3,906 Views
Registered: ‎10-12-2016

Hi Krishna,

Sorry for the late reply as I was on holidays. As suggested by Smarell in Xilinx community "Go to Xilinx Tools-> Program FPGA and then in Program FPGA window, choose the .elf file under software configurations as shown below. This will generate download.bit file which is a combination of your .bit file and chosen .elf file."

 

I am trying to do it but getting an error mentioned below

---------------------------------------------------------------------------------------------------------------------------------------

cmd /C updatemem -force -meminfo \
C:/Xilinx/Vivado/2016.3/sonoVTS_projects/LiaHDR_v1.0/LiaHDR_v1.0.sdk/LiaHDR_top_wrapper_hw_platform_1/LiaHDR_top_wrapper.mmi \
-bit \
C:/Xilinx/Vivado/2016.3/sonoVTS_projects/LiaHDR_v1.0/LiaHDR_v1.0.sdk/LiaHDR_top_wrapper_hw_platform_1/LiaHDR_top_wrapper.bit \
-data \
C:/Xilinx/Vivado/2016.3/sonoVTS_projects/LiaHDR_v1.0/LiaHDR_v1.0.sdk/testing/Debug/testing.elf \
-proc LiaHDR_top_i/microblaze_0 -out \
C:/Xilinx/Vivado/2016.3/sonoVTS_projects/LiaHDR_v1.0/LiaHDR_v1.0.sdk/LiaHDR_top_wrapper_hw_platform_1/download.bit

****** updatemem v2016.3 (64-bit)
  **** SW Build 1682563 on Mon Oct 10 19:07:27 MDT 2016
    ** Copyright 1986-2016 Xilinx, Inc. All Rights Reserved.

source C:/Xilinx/SDK/2016.3/scripts/updatemem/main.tcl -notrace
 CRITICAL WARNING: [Updatemem 57-172] The elf file code segment 1 with a defined address range of [0x60000000:0x6001DA3B] does not match any existing address spaces as defined in the mmmi file. Check the elf file and the mmi file for consistency.
ERROR: [Updatemem 57-153] Failed to update the BRAM INIT strings for C:/Xilinx/Vivado/2016.3/sonoVTS_projects/LiaHDR_v1.0/LiaHDR_v1.0.sdk/testing/Debug/testing.elf and C:/Xilinx/Vivado/2016.3/sonoVTS_projects/LiaHDR_v1.0/LiaHDR_v1.0.sdk/LiaHDR_top_wrapper_hw_platform_1/LiaHDR_top_wrapper.mmi.
  ERROR: [Common 17-39] 'update_mem' failed due to earlier errors.

INFO: [Common 17-206] Exiting updatemem at Mon Jan 09 13:36:16 2017...

---------------------------------------------------------------------------------------------------------------------------------------

Maybe you have some idea about this error. Smarell is not replying, maybe he is also on holidays.

Regards

 

0 Kudos
pratham
Scholar
Scholar
3,899 Views
Registered: ‎06-05-2013

@usman1818 As per error message please Check the elf file and the mmi file.

Are you sure they are pointing to the correct location?

-Pratham

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
usman1818
Observer
Observer
3,895 Views
Registered: ‎10-12-2016

Thanks for the reply.

No, I am not sure about their location. Can you please tell me how to verify their addresses. or maybe you can mention some documentation.

0 Kudos