${project_loc} doesn't expand in Debug Configurations settings

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

${project_loc} doesn't expand in Debug Configurations settings

2,800 Views
giusloq
Contributor III

I'd like to add an option in Debug Configurations-><my debug configuration>->JLink Debugger->Oher server options.

The option is -JLinkDevicesXMLPath and it wants an absolute path. Now I'd like to use Eclipse/MCUXpresso variables to avoid writing directly the path. What I'd like to do is:

-JLinkDevicesXMLPath ${project_loc}

However this doesn't work, because JLink emits and error saying it can't find the file in ${project_loc}. This means the variable isn't correctly expanded.

7 Replies

2,535 Views
DaPa1
Contributor III

${workspace_loc:/${ProjName}/ also doesn't work: 

DaPa1_0-1633436049652.png

 

0 Kudos

2,528 Views
converse
Senior Contributor V

Probably because what you have entered is not valid. You need a closing }

e.g. ${workspace_loc:/${ProjName}}

0 Kudos

2,523 Views
DaPa1
Contributor III

DaPa1_0-1633438606067.png

Tried also with ${workspace_loc} only and many other combinations, no luck...

As can be seen the issue is that the IDE passes the raw string to JLink instead to preprocess the eclipse variables:

DaPa1_1-1633439148093.png

 

0 Kudos

2,522 Views
DaPa1
Contributor III

DaPa1_0-1633438947629.png

DaPa1_0-1633439098939.png

 

With {workspace_loc} alone and hardcoded proj name, still the same....

0 Kudos

2,515 Views
DaPa1
Contributor III

DaPa1_0-1633440689472.png

Well, one trick: I found that JLinkGDBServerCL.exe will look for the script into the root of the IDE, so I simply passed only the name of the script and copied it to the IDE path.

DaPa1_1-1633441285298.png

With this workaround, RAM debugging doesn't depend anymore on workspace location, but of course will require the devs to have the script copied in the IDE path....

0 Kudos

2,780 Views
ErichStyger
Senior Contributor V

Hi @giusloq ,

no, this is not supported from what I can tell. It would require that the CDT command line parser would resolve first any build variables. But this is not the case: that command line string is passed 'as is' to the SEGGER J-Link server.

The only solution which comes to my mind would be to write a small script which parses the .launch XML file and replaces the variables you need.

I hope this helps,

Erich

2,784 Views
nxf58474
NXP Employee
NXP Employee

Hi,

 

Hope you are doing well. Have you tried with this: ${workspace_loc:/${ProjName}/?

 

This is how we include relative paths in MCUXpresso.

 

Best Regards,

Ricardo

0 Kudos