Generating and Compiling BSP with Advanced Driver/Library/OS/Processor Configuration - 2021.2 English

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2021-12-15
Version
2021.2 English

#Create a software design for the template application with default compiler flags and memory section settings

set sw_system_1 [hsi::create_sw_design system_1 -proc microblaze_1 -os
xilkernel ]

#Get the old driver object

set old_driver [hsi::get_drivers myip1]

#Set repository path to find the custom drivers and libraries

hsi::set_repo_path ./my_local_sw_repository

#Set the new driver name and version to old driver object

common::set_property NAME myip1_custom_driver $old_driver
common::set_property VERSION 1.0 $old_driver

#Change default OS configuration to desired one

set OS [hsi::get_os]
common::set_property CONFIG.systmr_dev axi_timer_0 $OS
common::set_property CONFIG.stdin axi_uartlite_0 $OS
common::set_property CONFIG.stdout axi_uartlite_0 $OS

#Add custom library to software design

hsi::add_library xilflash

#Get all the properties of the library, only read_only = false properties can be changed

common::report_property [hsi::get_libs xilflash]

#Change the default configuration of the library

set lib [hsi::get_libs xilflash]
common::set_property CONFIG.enable_amd true $lib
common::set_property CONFIG.enable_intel false $lib

#Generate the BSP with the above configuration

hsi::generate_bsp -dir advanced_bsp -compile

#Delete the library added to software design

hsi::delete_objs $lib