Flashing a MicroBlaze Program

Flashing a MicroBlaze Program

Step 1: Preparing for Programming

Navigate to Project Settings->Bitstream. Check the box next to -bin-file so Vivado knows to generate a bin file as well as a bit file.
Run synthesis and open the synthesized design. go to Tools->Edit Device Properties. Under General Set the Enable Bitstream Compression to “TRUE”. Under Configuration set the Configuration Rate (Mhz) to “33”. Finally under Configuration Modes select Master SPI x4. The settings for the Configuration Rate and Mode may differ for your board so check the documentation for your board.

Click OK and save the design.
Now generate the bitstream.
Flashing a MicroBlaze Program
Flashing a MicroBlaze Program
Flashing a MicroBlaze Program
Flashing a MicroBlaze Program

Step 2: Generating the Programming File From the SDK

Once the bitstream has finished generating export the hardware including the bitstream. Launch the SDK and create your C project as normal. Build the project to generate an .ELF file. This file will be used in the following steps to program the board.

Step 3: Adding the ELF to the Vivado Project

Return to Vivado and add a new constraint to the project. Locate the .ELF file generated by the SDK.

Flashing a MicroBlaze Program

Step 4: Associate the ELF With the MicroBlaze

Open the block design and right click on the MicroBlaze block. Select the “Associate ELF files” option. Find the Design Sources->system_i->microblaze_0 and click the “…” button on the right of the window. Navigate to the .ELF file as in the last step, select it and click OK until you are back to the main window of Vivado.

Flashing a MicroBlaze Program

Step 5: Program the Board

Regenerate the bitstream, this will build the c program into the binary.
Open the Hardware Manager and open the device.
Vivado will now erase and reprogram the memory on the board.

Flashing a MicroBlaze Program