cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
davidsummers
Contributor
Contributor
479 Views
Registered: ‎05-18-2015

TCL script to create Vitis project?

I am an HDL guy trying to write some software for a Zynq US+.  I am frustrated with Vitis (Eclipse ?) in that it does not seem to work correctly when I move the project folder to another computer.   I have resorted to creating the workspace from scratch on each computer any time I make a major change to the hardware.

I would like to have a TCL script that will import my XSA file, create the platform, create the BSP, import my C code and create an application.

I cannot find any tools in Vitis (2020.2) to help me create this TCL script.  There is no tool to export the project to TCL like Vivado has.

 

Does anyone have an example script that does this?   Is there another way to solve this issue other than TCL? 

 

I can get about half way there by copying TCL commands from the Vivado console, but it seems like there are a lot of GUI actions that do not create a corresponding TCL command in the console window. 

 

Any help, or tips on the best way to handle this would be appreciated.

 

 

0 Kudos
3 Replies
pvempati
Xilinx Employee
Xilinx Employee
445 Views
Registered: ‎01-03-2017

Hi @davidsummers ,

PLease use the below commands to create the Zynq bases application using the TCL script.

setws /tmp/test_ws
platform create -name zynq -hw zc702
domain create -name a9_standalone -os standalone -proc {ps7_cortexa9_0}
platform generate
app create -name app1 -platform zynq -domain a9_standalone -template {Hello World}
app build -name app1


You can check the more details about the XSCT in UG1400 document under XSCT section.

 

Thanks & Regards,

Praveen Kumar. V

davidsummers
Contributor
Contributor
391 Views
Registered: ‎05-18-2015

@pvempati Thank you.  That is what I was looking for.  I also discovered that the platform.tcl file also contains most of the necessary commands.  Somehow I has overlooked that before.

 

Your example works great.  I am now trying to create the freeRTOS lwip echo server app and getting errors.   (My end application is based on the lwip echo server, so that seems like the logical place to start)

Here is my script:

 

platform create -name zynq -hw zcu102
domain create -name a53_freertos -os freertos10_xilinx -proc {psu_cortexa53_0} -support-app {freertos_lwip_echo_server}
platform generate
app create -name app1 -platform zynq -domain a53_freertos -template {FreeRTOS lwIP Echo Server}
app build -name app1

 

 

 

platform generate fails with a message like "cp: cannot create regular file `../../../include/lwip/err.h': Invalid argument, but strangely, every time I run the "platform generate" command, the error message reports a different file as being the problem.

 

Some of the errors that I get are:

cp: cannot create regular file `../../../include/xsecure_sha.h': Invalid argument

cp: cannot create regular file `../../../include/lwip/apps/mdns_opts.h': Invalid argument

 

If I keep running "platform generate" from the console, it will eventually build correctly (after 3 or 4 tries).  (Note that I am using Vitis 2020.2 on Windows 10).

 

Could this be a path character length issue?  The full path to the lwip include files in my project is 

"C:\LASP_GIT\ADL\sw\zynq\zynq_te0802\zynq\psu_cortexa53_0\a53_freertos\bsp\psu_cortexa53_0\libsrc\lwip211_v1_3\src\lwip-2.1.1\src\include\lwip"

Which seems excessively long.

 

0 Kudos
davidsummers
Contributor
Contributor
372 Views
Registered: ‎05-18-2015

Is there a TCL command to import C source files into an application project?

0 Kudos