UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer pablo.leyva
Observer
5,611 Views
Registered: ‎07-16-2015

xsdk batch import sources - link to files

Jump to solution

Hi everyone,

 

I am trying to automatize the creation of several SDK projects through tcl scripting and xsdk batch mode but I am facing problems with the importsources command.

 

The command make a copy of the files in my project folder, but I am interested in a link to the file, not a copy (my files are under revision control system). I would like to know if there is way to do this. In the GUI is straight forward, so I assume that should be a way to accomplish the same thing through command line.

 

Thanks.

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
9,729 Views
Registered: ‎10-06-2016

Re: xsdk batch import sources - link to files

Jump to solution

Hi @pablo.leyva

 

I would say that there is no way to link files/folders into a project using the XSDK commands. However your use case should be covered with the importprojects command. I mean add the cproject file also in the revision control system and being sure that all the path in the project uses relative path to the project location.

 

Regards,

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
6 Replies
Scholar pratham
Scholar
5,560 Views
Registered: ‎06-05-2013

Re: xsdk batch import sources - link to files

Jump to solution

@pablo.leyva Check for the command here #67

 

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_4/ug1208-xsct-reference-guide.pdf

-Pratham

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Moderator
Moderator
9,730 Views
Registered: ‎10-06-2016

Re: xsdk batch import sources - link to files

Jump to solution

Hi @pablo.leyva

 

I would say that there is no way to link files/folders into a project using the XSDK commands. However your use case should be covered with the importprojects command. I mean add the cproject file also in the revision control system and being sure that all the path in the project uses relative path to the project location.

 

Regards,

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Observer pablo.leyva
Observer
5,511 Views
Registered: ‎07-16-2015

Re: xsdk batch import sources - link to files

Jump to solution

Hi!

 

Thanks for the hint, it is doing the trick. It would be nice to be able to do it through TCL, but now it's up and running.

 

Regards,

Pablo

0 Kudos
Visitor monakov
Visitor
4,926 Views
Registered: ‎07-09-2014

Re: xsdk batch import sources - link to files

Jump to solution

Hi Pablo!

 

But importprojects also copies the project inside workspace. That's why I'm unable to get out-of-source build.

How does it work in your project?

 

After a bit of struggling with Xilinx SDK I've ended with this ugly script:

 


# Unset workspace path
sdk setws -switch $::env(TEMP)

# Import software project
exec $eclipse -vm $vm -nosplash                                    \
    -application org.eclipse.cdt.managedbuilder.core.headlessbuild \
    -import "file://$apppath" -data $wspath

# Set workspace path back
sdk setws -switch $wspath


# Build projects
sdk projects -build


 

$eclipse == $::env(RDI_APPROOT)/eclipse/$::env(RDI_PLATFORM)$::env(RDI_OPT_EXT)/eclipsec

$vm == $::env(RDI_JAVAROOT)/bin

$apppath == Full path to application project

$wspath == Full path to workspace directory

 

Note 'file://' prefix, script wont work without it. At least on Windows, where absolute paths begin with drive letter (D:/)

 

Regards,

Yurii

0 Kudos
Visitor joris
Visitor
4,068 Views
Registered: ‎07-19-2016

Re: xsdk batch import sources - link to files

Jump to solution

Dear Xilinx,

 

I don't see why this thread is marked as fixed.

The "proposed" solution is a hack around the Xilinx supported tcl files that manually starts eclipse and does some magic.

 

The real solution would be to add a parameter to the importprojects so that you can choose if you want to copy the projects into the workspace or not.

 

If you look around on the internet you see that quite some people have problems with the copy being made by the current implementation of importprojects;

http://www.edaboard.com/showthread.php?t=362643

https://forums.xilinx.com/t5/Vivado-TCL-Community/SDK-XCMX-command-Import-project-without-doing-a-copy-into/m-p/740402/highlight/true#M5358

 

756 Views
Registered: ‎12-14-2018

Re: xsdk batch import sources - link to files

Jump to solution

Hi

I tried doing this, but I am unable to do regenbsp. The error it gives me is "couldn't open ".sdkproject": no such file or directory". Does anyone have this issue? or a workaround for this?

0 Kudos