How to change references command line

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change references command line

743 Views
rossrhone
Contributor III

157873_157873.jpghelp1.jpgI have downloaded a project from a repository that refers to another project. I'd really like to build this project with Codewarrior 10.4's command line tools. However, the reference path in my .project file doesn't correspond to the location of the project it references, on my computer. I needed a command-line, programmatic way of changing the reference path to the correct location on my machine. So I tried

 

ecd -references -project project_pathName -allConfigs -remove wrongReferencePathName

with the intent of then running

ecd -references -project project_pathName -allConfigs -add correctReferencePathName

 

But the first command gave me a file not found error. So, it looks like I can only remove references to projects that actually exist on my system, and can't get rid of bogus references to projects that aren't even valid locations on my filesystem.

 

Is there any way to remove a bad reference, one that doesn't correspond to a valid project location, from the command line? If not, can you think of any other way I might approach this issue?

 

Just for context, the way our company avoids this issue normally is via representing our projects and their references in a .wsd file. We drag-drop the file into the CodeWarrior GUI, and this automatically fixes all the references in all our .project files. The issue is that we can't figure out how to invoke the wsd file from the command line. If you know of any way of doing this, it would actually be much more helpful than an answer to my other question!

 

 

I tried multiple options for wrongReferencePathName. Above I tested "file:/C:/Development/DSM33/DSM33_India/DSM33_FS_v02.02/AlphaBoot", but I also tried "C:/Development/DSM33/DSM33_India/DSM33_FS_v02.02/AlphaBoot" and "C:\Users\Ross\Desktop\Round2\DM3\Freescale\DSM33_FS_v02.02\Firmware\.project".

They all produced the same error. The paths I'm trying don't exist in my filesystem--I have different paths to the referenced projects in my filesystem--so it kinda makes sense that I'm getting a fileNotFoundException. Maybe it's that the references tool is looking for a .project or .cproject file at the provided reference path and crashes out if none is found.

If this is true, I might try spoofing the bogus filepath in my system and copying over a .project file, but this is a real pain.

It's also possible that I'm just not using the referencedProjectLocation argument correctly--for reference command syntax is

ecd -references -project path [-config name | -allConfigs] ( -list | -add | -remove) referencedProjectLocation [buildConfigurationName]. I'm assuming this argument can only take a project filepath, but if I'm wrong or if there's a different way to identify a project with this argument, I'd love to know!

 

Here is the error output--not sure the full backtrace will be helpful

 

157884_157884.jpghelp3.jpg157883_157883.jpghelp2.jpg

Labels (1)
0 Kudos
Reply
1 Reply

643 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

this this the same discussion as

How to change references by command line?

So I input my comments there.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply