feat(platform/xilinx): add support for specifying application template
This commit is contained in:
@@ -248,9 +248,22 @@ proc _update_app_build_config {app_name build_type build_config is_vitis} {
|
||||
proc _create_app {app_name app_config platform_name is_vitis} {
|
||||
set cpu [dict get $app_config target_cpu]
|
||||
set os [dict get $app_config os]
|
||||
set lang [dict get $app_config language]
|
||||
set sources [dict get $app_config sources]
|
||||
set bsp_name "${app_name}_bsp"
|
||||
set lang [dict get $app_config language]
|
||||
if { $lang ne "C" && $lang ne "C++" } {
|
||||
_error "Unsupport language" "language should be C or C++"
|
||||
}
|
||||
if { [dict exists $app_config template] } {
|
||||
set template [dict get $app_config template]
|
||||
} elseif { !$is_vitis } {
|
||||
set template "Empty Application"
|
||||
} elseif { $lang eq "C++" } {
|
||||
set template "Empty Application (C++)"
|
||||
} else {
|
||||
set template "Empty Application(C)"
|
||||
}
|
||||
|
||||
|
||||
# Configure BSP/Domain for application
|
||||
if {[dict exists $app_config bsp] && [dict get $app_config bsp] ne ""} {
|
||||
@@ -280,7 +293,7 @@ proc _create_app {app_name app_config platform_name is_vitis} {
|
||||
-os $os \
|
||||
-lang $lang \
|
||||
-sysproj $::project_name \
|
||||
-template "Empty Application($lang)"
|
||||
-template "$template"
|
||||
_info "Application '$app_name' created for Vitis."
|
||||
} else {
|
||||
sdk createapp -name $app_name \
|
||||
@@ -289,7 +302,7 @@ proc _create_app {app_name app_config platform_name is_vitis} {
|
||||
-proc $cpu \
|
||||
-os $os \
|
||||
-lang $lang \
|
||||
-app "Empty Application"
|
||||
-template "$template"
|
||||
_info "Application '$app_name' created for Xilinx SDK."
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user