使用高级驱动程序、库、操作系统或处理器配置来生成和编译 BSP - 2022.1 Chinese

Vitis 统一软件平台文档 嵌入式软件开发 (UG1400)

Document ID
UG1400
Release Date
2022-04-26
Version
2022.1 简体中文

#使用默认编译器标志和存储器部分设置来为模板应用创建软件设计

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

#获取旧驱动程序对象

set old_driver [hsi::get_drivers myip1]

#设置存储库路径以查找自定义驱动程序和库

hsi::set_repo_path ./my_local_sw_repository

#将新的驱动程序名称和版本设置为旧驱动程序对象

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

#将默认操作系统配置更改为所需配置

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

#将自定义库添加到软件设计

hsi::add_library xilflash

#获取库的所有属性,只能更改 read_only = false 属性。

common::report_property [hsi::get_libs xilflash]

#更改库的默认配置

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

#使用以上配置生成 BSP

hsi::generate_bsp -dir advanced_bsp -compile

#删除已添加到软件设计的库

hsi::delete_objs $lib