From 9ec3408c79471b3f7c3e11a5407e8361850604ca Mon Sep 17 00:00:00 2001 From: Istvan Csomortani Date: Thu, 14 Jan 2021 17:49:49 +0200 Subject: [PATCH] adi_project_xilinx: Fix the adi_project process In most of the standalone projects the generic project creation flow is not followed. The project's device is defined manualy. This fix makes sure that those projects still builds without an issue. NOTE: In these case we should use adi_project_create directly in system_project.tcl. --- projects/scripts/adi_project_xilinx.tcl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/projects/scripts/adi_project_xilinx.tcl b/projects/scripts/adi_project_xilinx.tcl index 40cf4045b..39c0320ff 100644 --- a/projects/scripts/adi_project_xilinx.tcl +++ b/projects/scripts/adi_project_xilinx.tcl @@ -47,6 +47,9 @@ set p_prcfg_status "" # proc adi_project {project_name {mode 0} {parameter_list {}} } { + set device "" + set board "" + # Determine the device based on the board name if [regexp "_ac701$" $project_name] { set device "xc7a200tfbg676-2" @@ -123,12 +126,15 @@ proc adi_project_create {project_name mode parameter_list device {board "not-app global ADI_USE_OOC_SYNTHESIS global ADI_USE_INCR_COMP - set p_device $device + ## update the value of $p_device only if it was not already updated elsewhere + if {$p_device eq "none"} { + set p_device $device + } set p_board $board - if [regexp "^xc7z" $device] { + if [regexp "^xc7z" $p_device] { set sys_zynq 1 - } elseif [regexp "^xczu" $device] { + } elseif [regexp "^xczu" $p_device] { set sys_zynq 2 } else { set sys_zynq 0