Creating FSBL, PMUFW from XSCT 2018.3 for ZCU111 and boot over JTAG

In this brief tutorial I will show how to create the FSBL and PMUFW for a Zynq Ultrascale device:


proc generate_fsbl {} {
	if {[file exists zynqmp_fsbl/executable.elf] != 1} {
		set fsbl_design [hsi::create_sw_design fsbl_1 -proc psu_cortexa53_0 -app zynqmp_fsbl]
		common::set_property APP_COMPILER "aarch64-none-elf-gcc" $fsbl_design
		common::set_property -name APP_COMPILER_FLAGS -value "-DRSA_SUPPORT -DFSBL_DEBUG_INFO -DXPS_BOARD_ZCU111" -objects $fsbl_design
		hsi::add_library libmetal
		hsi::generate_app -dir zynqmp_fsbl -compile
	return "zynqmp_fsbl/executable.elf"


proc generate_pmufw {} {
	if {[file exists pmu_fw/executable.elf] != 1} {
		set pmufw_design [hsi::create_sw_design pmu_1 -proc psu_pmu_0 -app zynqmp_pmufw]
		hsi::add_library libmetal
		hsi::generate_app -dir pmu_fw -compile
		return "pmu_fw/executable.elf"
	return "pmu_fw/executable.elf"

In order to call these procs, the user needs to open the hdf (hsi::open_hw_design):

create apps
proc create_apps {hdf} {
    hsi::open_hw_design $hdf
    set pmufw [generate_pmufw]
    set fsbl [generate_fsbl]
    hsi::close_hw_design [hsi::current_hw_design]

To boot over JTAG on ZCU111:

boot over jtag
proc board_bringup {hdf} {
    hsi::open_hw_design $hdf
    set pmufw [generate_pmufw]
    set fsbl [generate_fsbl]
    #Add the Microblaze PMU to target
    targets -set -nocase -filter {name =~ "PSU"}
    mwr 0xFFCA0038 0x1FF
    # Download PMUFW to PMU
    target -set -filter {name =~ "MicroBlaze PMU"}
    dow $pmufw
    #Program PL with bitstream
    set fpga_programmed 0
    set bit [glob -nocomplain -directory [pwd] [file rootname $hdf].bit]
    if {$bit != ""} {
        fpga -f $bit
        set fpga_programmed 1
        puts "PL is programmed"
    targets -set -nocase -filter {name =~ "PSU"}
    # write bootloop and release A53-0 reset
    mwr 0xffff0000 0x14000000
    mwr 0xFD1A0104 0x380E
    # Download FSBL to A53 #0
    targets -set -filter {name =~ "Cortex-A53 #0"}
    dow fsbl
    after 500


  1. Create a TCL script with HSI commands above
  2. Launch XSCT 2018.3
  3. Change directory to the zipped directory
  4. source xsct_script.tcl
    • To just create the apps, use the command:
      • create_apps design_1_wrapper.hdf
    • To create the apps, and test on the ZCU111:
      • board_bringup design_1_wrapper.hdf