Associating an ELF file with MicroBlaze - 2024.1 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
Release Date
2024.1 English
You can use the following steps to associate an ELF file with a MicroBlaze™ processor in your design. Associating the ELF file configures a memory target, such as a set of BRAMs. The information that is needed for ELF file association includes:
  • The location of the ELF file to be loaded
  • The address space accessible via a master interface to a memory location, which the ELF file will be stored
  • The mapped peripheral within that address space representing the memory where ELF file will be stored and from where it will be accessed at run time
Important: This flow requires you to have access to the level of design hierarchy containing the MicroBlaze processor, and an existing ELF file.

This process uses SCOPED_TO_REF and SCOPED_TO_CELLS properties on the MicroBlaze processor itself, and not to the BRAMs that are the actual target of the ELF file data.

You can associate the ELF file to the MicroBlaze processor during the v++ --link process using the --advanced.param <param_name>=<param_value> command as described in --advanced Options. An example for a config file is shown below.


The link.tcl should add the ELF file to the Vivado Design Suite project, exclude it for use in simulation, and associate it with the MicroBlaze processor, as shown in the example below.

add_files <file_path>/executable.elf
set_property used_in_simulation 0 [get_files <file_path>/executable.elf]
set_property SCOPED_TO_REF base_microblaze_design [get_files -all \
-of_objects [get_fileset sources_1] {<file_path>/executable.elf}]
set_property SCOPED_TO_CELLS { microblaze_0 } \
[get_files -all -of_objects [get_fileset sources_1] {<file_path>/executable.elf}]

This information will be used to generate a BMM file which will be used by programs such as data2mem to generate a .mem file that will populate the BRAMs that are generated from the block_memory_generator.