UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
1,078 Views
Registered: ‎10-19-2017

Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution

There is a fair amount of documentation in the user guides for creating boot images for the APU and RPUs (UG1209, etc.). But is it possible to load a bitstream that includes a Microblaze core and baremetal application without the use of the PS?

 

In other words, my current configuration is running Linux on the APUs. I have three files in the boot partition of my SD card: BOOT.bin, uImage, system.dtb, and firmware.bit. BOOT.bin contains the FSBL and u-boot. So the boot sequence is:

FSBL -> u-boot -> load firmware.bit into PL -> Linux

 

But what if I don't want to run Linux in the APUs or the RPUs and I simply want to run a baremetal application in a Microblaze softcore? How do I simply load a bitstream into PL without any of the bootloaders? I have walked through the microblaze-quick-start-guide.pdf and can build and run hello world, but that is loaded over the JTAG. How do I setup my board to simply boot to that?

 

Thanks

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
1,436 Views
Registered: ‎11-30-2007

Re: Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution

The Zynq UltraScale+ MPSoC (ZUS+) is a processor first and therefore you will always use the PS to boot/configure the ZUS+.  Even if your PS is not being utilized in your design, you will still want to use bootgen to create an FSBL and include only your PL bitstream.

 

There are other considerations when integrating a MicroBlaze.

 

  • Where is your MicroBlaze system clock coming from?  Is it from the PS or do you have a external reference clock entering on the PL pin(s)?
  • What memory system are you targeting for your MicroBlaze?  PS-DDR, PL-MIG-DDR, etc.?

 

0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
1,437 Views
Registered: ‎11-30-2007

Re: Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution

The Zynq UltraScale+ MPSoC (ZUS+) is a processor first and therefore you will always use the PS to boot/configure the ZUS+.  Even if your PS is not being utilized in your design, you will still want to use bootgen to create an FSBL and include only your PL bitstream.

 

There are other considerations when integrating a MicroBlaze.

 

  • Where is your MicroBlaze system clock coming from?  Is it from the PS or do you have a external reference clock entering on the PL pin(s)?
  • What memory system are you targeting for your MicroBlaze?  PS-DDR, PL-MIG-DDR, etc.?

 

0 Kudos
Contributor
Contributor
1,027 Views
Registered: ‎10-19-2017

Re: Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution

Thanks for the quick response. I did a quick test though and do not seem to see my "Hello world" output from my MicroBlaze core. Can you please confirm these steps are correct?

 

According to the wiki (http://www.wiki.xilinx.com/Solution+Zynq+PL+Programming), "The First Stage Boot-Loader (FSBL) is capable of programming the PL before loading U-Boot, which may be necessary for some applications. To have the FSBL load the PL, include the bitstream file when generating boot.bin and boot normally."

 

So I created a new BIF with the following contents:

the_ROM_image:
{
        [bootloader,destination_cpu=a53-0] zynqmp_fsbl.elf
        [destination_device=pl] download.bit
}

Where the download.bit was the bitstream output from the SDK which should be the PL + MicroBlaze application code. I then built the BOOT.BIN with this command:

bootgen -image pl-boot.bif -arch zynqmp -w -o i BOOT.BIN

I see FSBL print statements from the PS UART which means that the boot binary is being executed, but I do not see my hello world from the PL UART like I do when I run the bitstream over JTAG.

 

Did I make a mistake in the bootgen?

 

Thanks

0 Kudos
Xilinx Employee
Xilinx Employee
1,025 Views
Registered: ‎11-30-2007

Re: Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution

Did you include the ELF file as part of your Vivado source?  If  not, you need to use SDK to run the application on the MicroBlaze (i.e. download from SDK to the MicroBlaze system).

0 Kudos
Contributor
Contributor
983 Views
Registered: ‎10-19-2017

Re: Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution

Forgive my ignorance, this is a new environment for me. Could you provide some clarification, please?

 

Did you include the ELF file as part of your Vivado source?

 

I did not. I'm trying to get an understanding for the workflow here. Our FPGA guy gave me an HDF with the bitstream. I created an application project with that using the SDK and did a build. The result of that is the download.bit I used for programming, or so I thought: 

Capture.JPG

 

But I now see that the byte-size of the download.bit and the base_mb_wrapper.bit (from the HDF) are identical, which means the MicroBlaze ELF file is not included in that.

 

So the workflow would then be for me (software engineer) to hand the MicroBlaze application ELF back to the FPGA guy to produce another bitstream from Vivado with the software built-in? Is there a UG describing the steps to do this in Vivado?

0 Kudos
Contributor
Contributor
975 Views
Registered: ‎10-19-2017

Re: Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution

I found the solution with a little searching. 

 

Details can be found here: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_4/ug898-vivado-embedded-design.pdf

 

The updatemem utility is what combines the MicroBlaze ELF with the bitstream:

 

updatemem -meminfo base_mb_wrapper.mmi -data microblaze_helloworld.elf -bit base_mb_wrapper.bit -proc base_mb_i/microblaze_0 -out combined_bitstream.bit

I then created a BOOT.BIN from that using the BIF file above and I'm up and running.

 

Thanks for the help.

0 Kudos
Highlighted
Moderator
Moderator
876 Views
Registered: ‎09-12-2007

Re: Howto Boot Standalone PL with Microblaze on UltraScale+

Jump to solution
0 Kudos