Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bb7bc59b4 | ||
|
|
a6b99bd0bc |
+12
-12
@@ -30,16 +30,16 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef PROJECT
|
ifndef PROJECT
|
||||||
$(error "PROJECT variable needs to be set")
|
@$(error "PROJECT variable needs to be set")
|
||||||
endif
|
endif
|
||||||
ifndef PLATFORM
|
ifndef PLATFORM
|
||||||
$(error "PLATFORM variable needs to be set")
|
@$(error "PLATFORM variable needs to be set")
|
||||||
endif
|
endif
|
||||||
ifndef BUILD_DIR
|
ifndef BUILD_DIR
|
||||||
$(error "BUILD_DIR variable needs to be set")
|
@$(error "BUILD_DIR variable needs to be set")
|
||||||
endif
|
endif
|
||||||
ifndef CONFIG_FILE
|
ifndef CONFIG_FILE
|
||||||
$(error "CONFIG_FILE variable needs to be set")
|
@$(error "CONFIG_FILE variable needs to be set")
|
||||||
endif
|
endif
|
||||||
ifndef SCRIPT_DIR
|
ifndef SCRIPT_DIR
|
||||||
CURRENT_FILE := $(lastword $(MAKEFILE_LIST))
|
CURRENT_FILE := $(lastword $(MAKEFILE_LIST))
|
||||||
@@ -66,15 +66,15 @@ endif
|
|||||||
PHONY += all
|
PHONY += all
|
||||||
ifneq ($(wildcard $(BUILD_LOCK)),)
|
ifneq ($(wildcard $(BUILD_LOCK)),)
|
||||||
all:
|
all:
|
||||||
$(call print_build_type,$(PLATFORM))
|
@$(call print_build_type,$(PLATFORM))
|
||||||
$(MAKE) --no-print-directory build
|
$(MAKE) --no-print-directory build
|
||||||
$(call print,Done ($(notdir $(BUILD_DIR))))
|
@$(call print,Done ($(notdir $(BUILD_DIR))))
|
||||||
else
|
else
|
||||||
all:
|
all:
|
||||||
$(call print_build_type,$(PLATFORM))
|
@$(call print_build_type,$(PLATFORM))
|
||||||
$(MAKE) --no-print-directory project
|
$(MAKE) --no-print-directory project
|
||||||
$(MAKE) --no-print-directory build
|
$(MAKE) --no-print-directory build
|
||||||
$(call print,Done ($(notdir $(BUILD_DIR))))
|
@$(call print,Done ($(notdir $(BUILD_DIR))))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
project: $(PLATFORM)_project
|
project: $(PLATFORM)_project
|
||||||
@@ -93,18 +93,18 @@ sdkopen: $(PLATFORM)_sdkopen
|
|||||||
PHONY += clean
|
PHONY += clean
|
||||||
ifneq ($(wildcard $(BUILD_LOCK)),)
|
ifneq ($(wildcard $(BUILD_LOCK)),)
|
||||||
clean:
|
clean:
|
||||||
$(call print,Cleaning sdk build uploaded to board)
|
@$(call print,Cleaning sdk build uploaded to board)
|
||||||
$(MAKE) --no-print-directory $(PLATFORM)_sdkclean
|
$(MAKE) --no-print-directory $(PLATFORM)_sdkclean
|
||||||
else
|
else
|
||||||
clean:
|
clean:
|
||||||
$(call print,No project found, cleaning dummy files)
|
@$(call print,No project found, cleaning dummy files)
|
||||||
$(MAKE) --no-print-directory reset
|
$(MAKE) --no-print-directory reset
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Remove the whole build directory
|
# Remove the whole build directory
|
||||||
PHONY += reset
|
PHONY += reset
|
||||||
reset: $(PLATFORM)_reset
|
reset: $(PLATFORM)_reset
|
||||||
$(call print,[Delete] $(BUILD_DIR))
|
@$(call print,[Delete] $(BUILD_DIR))
|
||||||
$(call remove_dir,$(BUILD_DIR))
|
@$(call remove_dir,$(BUILD_DIR))
|
||||||
|
|
||||||
.PHONY: $(PHONY)
|
.PHONY: $(PHONY)
|
||||||
|
|||||||
@@ -268,6 +268,13 @@ proc _create_app {app_name app_config platform_name is_vitis} {
|
|||||||
# Configure BSP/Domain for application
|
# Configure BSP/Domain for application
|
||||||
if {[dict exists $app_config bsp] && [dict get $app_config bsp] ne ""} {
|
if {[dict exists $app_config bsp] && [dict get $app_config bsp] ne ""} {
|
||||||
set bsp_name [dict get $app_config bsp]
|
set bsp_name [dict get $app_config bsp]
|
||||||
|
if {![dict exists $::config bsps]} {
|
||||||
|
_error "BSP configuration missing" "The 'bsps' section is not found in the configuration."
|
||||||
|
} elseif {![dict exists [dict get $::config bsps] $bsp_name]} {
|
||||||
|
_error "BSP configuration missing" "No configuration found for BSP '$bsp_name' in the 'bsps' section."
|
||||||
|
} else {
|
||||||
|
_info "Configuring BSP '$bsp_name' for application '$app_name'."
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
set bsp_config [dict create]
|
set bsp_config [dict create]
|
||||||
set bsp_config [dict set bsp_config target_cpu $cpu]
|
set bsp_config [dict set bsp_config target_cpu $cpu]
|
||||||
@@ -280,6 +287,7 @@ proc _create_app {app_name app_config platform_name is_vitis} {
|
|||||||
set bsp_cfg [dict get $app_config bsp_config]
|
set bsp_cfg [dict get $app_config bsp_config]
|
||||||
set bsp_config [dict merge $bsp_config [dict create config $bsp_cfg]]
|
set bsp_config [dict merge $bsp_config [dict create config $bsp_cfg]]
|
||||||
}
|
}
|
||||||
|
_info "Creating BSP $bsp_name for Application $app_name ..."
|
||||||
_configure_bsp $bsp_name $bsp_config $platform_name $is_vitis
|
_configure_bsp $bsp_name $bsp_config $platform_name $is_vitis
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ define tcl_util
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
xilinx_sdkopen:
|
xilinx_sdkopen:
|
||||||
$(call print,Launching IDE...)
|
@$(call print,Launching IDE...)
|
||||||
@if [ "$(call check_command,vitis)" = "y" ]; then \
|
@if [ "$(call check_command,vitis)" = "y" ]; then \
|
||||||
if [ "$(XILINX_VITIS_CLASSIC)" = "y" ]; then \
|
if [ "$(XILINX_VITIS_CLASSIC)" = "y" ]; then \
|
||||||
vitis -classic -workspace=$(BUILD_DIR); \
|
vitis -classic -workspace=$(BUILD_DIR); \
|
||||||
@@ -23,20 +23,18 @@ xilinx_sdkopen:
|
|||||||
|
|
||||||
PHONY += xilinx_sdkbuild
|
PHONY += xilinx_sdkbuild
|
||||||
xilinx_sdkbuild:
|
xilinx_sdkbuild:
|
||||||
$(call print,[Build] SDK projects in $(BUILD_DIR))
|
@$(call print,[Build] SDK projects in $(BUILD_DIR))
|
||||||
$(call tcl_util, build) $(HIDE)
|
$(call tcl_util, build) $(HIDE)
|
||||||
|
|
||||||
PHONY += xilinx_sdkclean
|
PHONY += xilinx_sdkclean
|
||||||
xilinx_sdkclean:
|
xilinx_sdkclean:
|
||||||
$(call print,[Delete] SDK artefacts from $(BUILD_DIR))
|
@$(call print,[Delete] SDK artefacts from $(BUILD_DIR))
|
||||||
$(call tcl_util, clean_project) $(HIDE)
|
$(call tcl_util, clean_project) $(HIDE)
|
||||||
|
|
||||||
xilinx_project:
|
xilinx_project:
|
||||||
|
@$(call print,Creating and configuring the IDE project)
|
||||||
$(call mk_dir,$(BUILD_DIR))
|
$(call mk_dir,$(BUILD_DIR))
|
||||||
$(call print,Creating and configuring the IDE project)
|
|
||||||
$(call tcl_util, create_project) $(HIDE)
|
$(call tcl_util, create_project) $(HIDE)
|
||||||
|
|
||||||
xilinx_reset: xilinx_clean_all
|
xilinx_reset:
|
||||||
|
|
||||||
xilinx_clean_all:
|
|
||||||
$(call remove_dir,.Xil) $(HIDE)
|
$(call remove_dir,.Xil) $(HIDE)
|
||||||
Reference in New Issue
Block a user