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!

AR# 66629

2016.1 - SDK - Using SDK batchmode commands, and migration guide


This Answer Record introduces the SDK Batchmode commands in Vivado 2016.1 that can be used for building and modifying eclipse aware SDK projects.


The SDK batchmode command set is listed below. The command list has been greatly improved upon from the command set available in the 2015.4 release.

In Vivado 2015.4, to create a usable script, users had to use both the SDK batch mode, and HSI API. However, in Vivado 2016.1, users should be able to just use the SDK batchmode commands to create their scripts.

The advantage of using the SDK batch mode over HSI is that projects created here are eclipse aware, meaning that the projects can be opened in the SDK GUI.

The table below can be used for porting existing scripts to 2016.1, or for starting a new script from scratch.

There are also a few use-cases provided for ease of use.

For more help on these commands, type "SDK batchmode" into the SDK 2016.1 help.

2015.4 Command2016.1 CommandDetails
N/AopenhwOpen a hardware design
N/AclosehwClose a hardware design
N/AopenbspOpens a BSP
N/AclosebspCloses a BSP
N/AupdatemssUpdate the .mss file with the changes done in BSP
N/AgetaddrmapGet the address map of the IP connect to the processor
N/AgetperipheralsGet list of all peripherals in hardware design
set_user_repo_path repoSoftware repositories command
N/AconfigbspConfigure the parameters of BSP
N/AsetlibSet library and version in BSP
N/AremovelibRemove library From BSP
N/AgetlibsGet libraries from BSP
N/AsetdriverSet driver and version in BSP
N/AgetdriversGet drivers from BSP
N/AsetosversionGet OS version from BSP
N/AgetosGet OS details from BSP
set_workspacesetwsSet the SDK workspace
get_workspacegetwsGet the SDK workspace
create_hw_project createhwCreate a Hardware platform
create_bsp_project createbspCreate BSP project
create_app_project createappCreate an application project
build_projectprojectsBuild/Clean projects
import_projectsimportprojectsImport projects to workspace
import_sourcesimportsourcesImport source to application project
get_projectsgetprojectsGet projects from workspace
delete_projectsdeleteprojectsDelete projects from workspace
get_build_configconfigappConfigure settings for applications projects
N/Apetalinux-bootBoots MicroBlaze/Zynq/Zynq MPSoC with PetaLinux Images through JTAG/QEMU
N/Apetalinux-buildBuilds PetaLinux Project, or specified Component
N/Apetalinux-configConfigures the project or the specified component with menuconfig.
N/Apetalinux-createCreate new PetaLinux project or Component
N/Apetalinux-packagepackages various image format, firmware, prebuilt and bsps
N/Apetalinux-install-pathAdd PetaLinux install path
N/Apetalinux-utilprovides the misc utilities


Use-Case 1: Creating Project applications using the Application templates.

In this use-case, the FSBL is created for the CortexA53 processor:

  • setws workspace
  • createhw -name hw_0 -hwspec <path-to-HDF>
  • createapp -name fsbl -app {Zynq MP FSBL} -proc psu_cortexa53_0 -hwproject hw_0 -os standalone
  • projects -build
  • closehw <path-to-HDF>

Note: Here, the xilffs and xilsecure libraries will be automatically added to the BSP.

Note: To add the debug switch, use the following command before the projects-build command:

  • configproject -app fsbl -add define-compiler-symbols FSBL_DEBUG_DETAILED


Use-Case 2: Modifying the BSP settings.

In this use-case, a Hello World application is built targeting the MicroBlaze processor. The STDIN/OUT OS parameters are changed to use the MDM_0.

  • setws workspace
  • createhw -name hw_0 -hwspec <path-to-HDF>
  • createapp -name hello -app {Hello World} -proc microblaze_0 -hwproject hw_0 -os standalone
  • configbsp -hw hw_0 -bsp hello_bsp stdin mdm_1
  • configbsp -hw hw_0 -bsp hello_bsp stdout mdm_1
  • projects -build
  • closehw <path-to-HDF>

Note: To get the BSP name, use the getprojects command.

Note: To get a list of the peripherals, use the getperipherals <path-to-HDF> command.

Note: To update a parameter, use the command below:

  • configbsp -hw hw_0 -bsp hello_bsp <parameter> <value>


Use-Case 3: Changing compiler options of an Application project

In this use-case, the compiler option -std=c99 is added.

  • setws workspace
  • createhw -name hw_0 -hwspec <path-to-HDF>
  • createapp -name loop_test -app {Empty Application} -proc psu_cortexa53_0 -hwproject hw_0 -os standalone
  • importsources -name loop_test -path loop_src
  • configapp -app loop_test -set compiler-misc -std=c99
  • projects -build


Use-case 4: Creating a Linux Image

In this use-case, we will create a Linux Image for the Zynq UltraScale.

Note: The PetaLinux commands are only available on Linux OS, and PetaLinux is pre-installed.

  • petalinux-install-path <path/to/petalinux/install>
  • petalinux-create -t project -n test --template zynqMP
  • petalinux-config --get-hw-description=<path/to/HDF> -p test
  • petalinux-build

Use-case 5: Passing compiler symbol

In this use-case, we will create a simple MicroBlaze project, and passing a compiler symbol to the application (test):

  • setws workspace
  • createhw -name hw_0 -hwspec base_microblaze_design_wrapper.hdf
  • createapp -name test -app {Empty Application} -proc microblaze_0 -hwproject hw_0 -os standalone
  • importsources -name test -path test_src
  • configapp -app test build-config Debug
  • configapp -app test define-compiler-symbols TEST_DEFINE
  • configapp -app test build-config Release
  • configapp -app test define-compiler-symbols TEST_DEFINE
  • projects -build

Use-case 6: Creating a bootable BOOT.BIN file

In this use-case, we will target the CortexA53 and create a FSBL, and a Hello World application. Next, we will target the PSU MicroBlaze and create the PSU Firmware.

Finally, we use bootgen to create a bootable BIN file that can be placed directly on the SD Card.

  • setws workspace
  • createhw -name hw_0 -hwspec <path-to-HDF>
  • createapp -name fsbl -app {Zynq MP FSBL} -proc psu_cortexa53_0 -hwproject hw_0 -os standalone
  • createapp -name hello -app {Hello World} -proc psu_cortexa53_0 -hwproject hw_0 -os standalone
  • createapp -name pmu_fw -app {ZynqMP PMU Firmware} -proc psu_microblaze_0 -hwproject hw_0 -os standalone
  • projects -build
  • closehw <path-to-HDF>
  • bootgen -arch zynqmp -image bootgen.bif -o -i BOOT.BIN -w on

Note: the bootgen.bif file is shown below:

[fsbl_config] a53_x64
[pmufw_image] pmu_fw.elf
[bootloader] fsbl.elf
[, destination_device=pl] design_1_wrapper.bit
[, destination_cpu=a53-0] hello.elf

AR# 66629
Date Created 02/15/2016
Last Updated 06/13/2016
Status Active
Type General Article
  • Zynq UltraScale+ MPSoC
  • Zynq-7000
  • Artix-7
  • More
  • Kintex UltraScale
  • Kintex UltraScale+
  • Kintex-7
  • Virtex-7
  • Less
  • Vivado Design Suite - 2015.4.1
  • Vivado Design Suite - 2015.4