Skip to content

Instantly share code, notes, and snippets.

@trabucayre
Created January 22, 2022 06:35
Show Gist options
  • Save trabucayre/5b2027555409969a145acc932b319f3a to your computer and use it in GitHub Desktop.
Save trabucayre/5b2027555409969a145acc932b319f3a to your computer and use it in GitHub Desktop.
Zynq Ultrascale+ MPSoC: pm_cfg_obj.c generation script
# xsct -nodisp -sdx gen_pm_cfg.tcl project.xsa
# open the hardware design and produces:
# - bsp files
# - fsbl structure
#
# According to
# https://lucaceresoli.net/zynqmp-uboot-spl-pmufw-cfg-load/
# pm_cfg_obj.c is required by pmufw (Platform Management Unit) at boot time
# used with https://github.com/lucaceresoli/zynqmp-pmufw-builder
# in uboot context allows to build a fully functional uboot ready
# for ZynqMP device
set xsa_name [lindex $argv 0]
# open xsa file (hardware design)
hsi::open_hw_design $xsa_name
# create a software design
hsi::create_sw_design cortexsw -proc psu_cortexa53_0 -os standalone
hsi::generate_bsp -dir cortex_bsp_out
# fsbl files generation
# cortex/app_out/psu_init.c
# cortex_app_out/zynqmp_fsbl_bsp/psu_cortexa53_0/libsrc/xilpm_v*/src/pm_cfg_obj.c
hsi::generate_app -app zynqmp_fsbl -proc psu_cortexa53_0 -dir cortex_app_out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment