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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

3,636件の閲覧回数
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 返答(返信)

3,371件の閲覧回数
DaPa1
Contributor III

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

DaPa1_0-1633436049652.png

 

0 件の賞賛
返信

3,364件の閲覧回数
converse
Senior Contributor V

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

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

0 件の賞賛
返信

3,359件の閲覧回数
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 件の賞賛
返信

3,358件の閲覧回数
DaPa1
Contributor III

DaPa1_0-1633438947629.png

DaPa1_0-1633439098939.png

 

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

0 件の賞賛
返信

3,351件の閲覧回数
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 件の賞賛
返信

3,616件の閲覧回数
ErichStyger
Specialist I

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

3,620件の閲覧回数
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 件の賞賛
返信