cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,733 Views
Registered: ‎07-30-2019

Associate ELF file in Vivado 2018.3

Jump to solution

Hi,

For an Artix-7 project we create a Vivado project in Vivado 2018.3 batch mode. We use a TCL script to build a MicroBlaze Block Design. To this MicroBlaze Block Design an bootloader.elf is associated post create project.

We have the expectation with this routine the .elf file would be mapped in the BRAM of the MicroBlaze BD. Next by programming the FPGA with the Vivado Hardware Manager the MicroBlaze processor executes the software from the BRAM. With a test we concluded this expectation is false.

But when we export the build project with bitstream to XSDK and program the FPGA with Xilinx/Program FPGA and configure the bitstream with bootloader.elf. The bootloader executes as expected.

My first question is this expectation legit? If not could some one give support/information what the workflow is with an .elf file associated to a bitstream pre-synthesis?

My second question is the correct workflow to use the XSDK to associate an .elf file with a .bit bitstream and has the build mode Debug or Release consequences?

Many thanks,

Chileam

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
1,681 Views
Registered: ‎11-28-2007

No, updatemem should not be required. It should run and work automatically in project mode.

Did you associate the ELF before or after running implementation?

What is the output of the following commands in the Vivado project?

get_files *.elf
get_property SCOPED_TO_CELLS [get_files *.elf]
get_property SCOPED_TO_REF [get_files *.elf]

 

Based on the similar issue reported in this thread, can you after you program the bitstream, check the contents of the BRAM using XSDB:

XSDB% connect
XSDB% targets X
(where X is the processor)
XSDB% mrd 0x00000000 0x10

Open the ELF in SDK to see if the contents matches (first 16x words)

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

Give Kudos to a post which you think is helpful and reply oriented by clicking the star next to the post.

View solution in original post

0 Kudos
4 Replies
Highlighted
Xilinx Employee
Xilinx Employee
1,709 Views
Registered: ‎11-28-2007

Hi Chileam,

Have you associated the ELF file using the Tools -> Associate ELF Files command from the Vivado IDE? Then the Vivado Design Suite automatically merges the associated ELF file for the embedded processor design when generating the device bitstream.

For more information see UG898 chapter 7.

 

Best regards

Dries

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

Give Kudos to a post which you think is helpful and reply oriented by clicking the star next to the post.
0 Kudos
Highlighted
Visitor
Visitor
1,693 Views
Registered: ‎07-30-2019

Hi Dries, Yes the ELF file is associated via; Tools -> Associate ELF Files. With in the bitstream implementation log is; [Memdata 28-144] Successfully populated the BRAM INIT strings from the following elf files: logged. But the bootloader software doesn't boot.

When we use updatemem to create a new bitstream the bootloader software does boot.

My question is whether the use of updatemem is the new workflow to populate the BRAM?

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
1,682 Views
Registered: ‎11-28-2007

No, updatemem should not be required. It should run and work automatically in project mode.

Did you associate the ELF before or after running implementation?

What is the output of the following commands in the Vivado project?

get_files *.elf
get_property SCOPED_TO_CELLS [get_files *.elf]
get_property SCOPED_TO_REF [get_files *.elf]

 

Based on the similar issue reported in this thread, can you after you program the bitstream, check the contents of the BRAM using XSDB:

XSDB% connect
XSDB% targets X
(where X is the processor)
XSDB% mrd 0x00000000 0x10

Open the ELF in SDK to see if the contents matches (first 16x words)

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

Give Kudos to a post which you think is helpful and reply oriented by clicking the star next to the post.

View solution in original post

0 Kudos
Highlighted
Visitor
Visitor
1,670 Views
Registered: ‎07-30-2019

Hi Dries,

@driesd wrote:

No, updatemem should not be required. It should run and work automatically in project mode.

Did you associate the ELF before or after running implementation?

What is the output of the following commands in the Vivado project?

get_files *.elf
get_property SCOPED_TO_CELLS [get_files *.elf]
get_property SCOPED_TO_REF [get_files *.elf]

The ELF file is associated before running implementation.

The properties of SCOPED_TO_CELLS and SCOPED_TO_REF returns:

get_files *.elf
/xilinx/project.srcs/sources_1/bd/ublaze_hyperbus/ip/ublaze_hyperbus_microblaze_0_0/data/mb_bootloop_le.elf /xilinx/project.sdk/bootloader/Release/bootloader.elf
get_property SCOPED_TO_CELLS [get_files *.elf]
{} microblaze_0
get_property SCOPED_TO_REF [get_files *.elf]
{} ublaze_hyperbus


Based on the similar issue reported in this thread, can you after you program the bitstream, check the contents of the BRAM using XSDB:

XSDB% connect
XSDB% targets X
(where X is the processor)
XSDB% mrd 0x00000000 0x10

Open the ELF in SDK to see if the contents matches (first 16x words)


elf file.PNG

BRAM elf.PNG

 

The images shows that the data match each other.

I hope this provides sufficient information.

Chileam

0 Kudos