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.
${workspace_loc:/${ProjName}/ also doesn't work:
Probably because what you have entered is not valid. You need a closing }
e.g. ${workspace_loc:/${ProjName}}
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:
With {workspace_loc} alone and hardcoded proj name, still the same....
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.
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....
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
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