cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
112 Views
Registered: ‎02-27-2016

Using XSCT to configure Vitis workspace from fresh Git checkout

I am trying to script setup of my Vitis workspace from a fresh Git checkout of my software project. My problem is that every script I have tried results in a Vitis workspace where Vitis thinks the application project ismissing.

The setup script is located at "C:\Work\my_proj\sw\git\scripts\setup.tcl"

The workspace is located at "C:\Work\my_proj\sw\workspace"

The XSA is located at "C:\Xilinx\Vitis\2020.1\data\embeddedsw\lib\fixed_hwplatforms\zcu102.xsa" and is referenced in the script via the "xsa" variable in the script.

I am running on Windows 10 in a Windows command console where I have previously run "C:\Xilinx\Vitis\2020.1\settings64.bat". I run the script from the workspace directory and reference the setup script via a relative path.

My first script was:

setws .
app create -name "my_app" -hw $xsa -os "freertos10_xilinx" -proc "psu_cortexa53_0" -template "FreeRTOS Hello World"

I then launched Vitits from the console, selected the workspace, and saw that the platform, system, and application projects all showed up as present. Success. I then updated the script so that I had a bit more control. My second script was:

setws .
platform create -name "zcu102" -hw $xsa
domain create -name "app_domain" -os "freertos10_xilinx" -proc "psu_cortexa53_0"
app create -name "my_app" -platform "zcu102" -domain "app_domain" -template "FreeRTOS Hello World" -sysproj "my_app_system"

I then launched Vitis from the console, selected the workspace, and saw that the platform and system projects showed up in the Explorer view, but the application project showed up as part of the system project, but the icon was a "closed" folder and was empty. Right-clicking it and selecting "Delete" resulted in an error "'my_app' does not exist anymore". Attempting to refresh the system project or explorer view did nothing. I then updated the script to:

setws .
platform create -name "zcu102" -hw $xsa
domain create -name "app_domain" -os "freertos10_xilinx" -proc "psu_cortexa53_0"
platform write
platform generate
app create -name "my_app" -platform "zcu102" -domain "app_domain" -template "FreeRTOS Hello World" -sysproj "my_app_system"

Again, the application project showed up as missing in the Explorer view in Vitis. Using File Explorer I verified that the application project did actually exist in the workspace directory on disk and that the expected generated files were present, and it was just not showing up in the Vitis Explorer view. I then select "File > Import..." from within Vitis, chose "Eclipse workspace or zip file", and selected my existing workspace. Vitis showed that the application project was on disk. I select it, click "Ok" and voila, the application project appears in the Vitis Explorer view. So, I updated the script to:

setws .
platform create -name "zcu102" -hw $xsa
domain create -name "app_domain" -os "freertos10_xilinx" -proc "psu_cortexa53_0"
platform write
platform generate
app create -name "my_app" -platform "zcu102" -domain "app_domain" -template "FreeRTOS Hello World" -sysproj "my_app_system"
importprojects.

However, again, the application project shows up as missing in the Vitis Explorer view.

To make sure the commands were doing what I thought they should do, emptied the workspace directory, restarted Vitis, opened an XSCT console, and execute each of the following commands, individually:

platform create -name "zcu102" -hw $xsa
domain create -name "app_domain" -os "freertos10_xilinx" -proc "psu_cortexa53_0"
app create -name "my_app" -platform "zcu102" -domain "app_domain" -template "FreeRTOS Hello World" -sysproj "my_app_system"

When done, the platform, system, and application projects all show up in Vitis Explorer as they should.

What am I missing? Why isn't my script creating a properly configured workspace?

DornerWorks
https://goo.gl/8wtknW
0 Kudos
1 Reply
Highlighted
Advisor
Advisor
82 Views
Registered: ‎01-28-2008

Hi @corrin.meyer and welcome to the Twilight Zone of Vitis scripting.

  I've spent a few days going through your path some time ago and found the same issue. I worked on a small script that would work in my testing, that may be useful to you for comparison. Please find it attached.

Thanks,

-Pat

 

Give kudos if helpful. Accept as solution if it solves your problem.
https://tuxengineering.com/blog

0 Kudos