Linker script search paths

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

Linker script search paths

Jump to solution
1,250 Views
chadgraham
Contributor V

Hello,

In the MCUXpresso IDE User Manual, section 17.14.2 (Linkerscript) Reference, the manual states "The searchPath can be set in a script by using the syntax <#global searchPath=“c:/windows/path;d:/another/windows/path”>".

Is there an example on what this script is to look like and how to implement it?

0 Kudos
1 Solution
1,228 Views
EdwinHz
NXP TechSupport
NXP TechSupport

The listing of search paths in section 17.14.2 can be tricky, but it demonstrates the order in which MCUXpresso searches for the scripts to create the linker files. It first looks inside the scripts under project/linkscripts, and then searches on the path specified by the searchPath global variable. As the User Manual states, this variable should be set “in a script”. Therefore, you would have to make a new one and place it under project/linkscripts to set a new definition of searchPath. This way, after looking under project/linkscripts, there will be a definition of this variable and MCUXpresso will be able to look for the specified paths. Since it was written by the user, this script should be the “user.ldt” file. This one has the highest priority on the hierarchy because it contains the user variables that will be used in the rest of the scripts.

Erich Styger demonstrates the creation of new FreeMarker scripts on this post; Perhaps you will find it useful: https://mcuoneclipse.com/2019/10/06/linking-bootloader-applications-with-eclipse-and-freemarker-scri...

 

I hope this helps,

Edwin.

 

View solution in original post

1 Reply
1,229 Views
EdwinHz
NXP TechSupport
NXP TechSupport

The listing of search paths in section 17.14.2 can be tricky, but it demonstrates the order in which MCUXpresso searches for the scripts to create the linker files. It first looks inside the scripts under project/linkscripts, and then searches on the path specified by the searchPath global variable. As the User Manual states, this variable should be set “in a script”. Therefore, you would have to make a new one and place it under project/linkscripts to set a new definition of searchPath. This way, after looking under project/linkscripts, there will be a definition of this variable and MCUXpresso will be able to look for the specified paths. Since it was written by the user, this script should be the “user.ldt” file. This one has the highest priority on the hierarchy because it contains the user variables that will be used in the rest of the scripts.

Erich Styger demonstrates the creation of new FreeMarker scripts on this post; Perhaps you will find it useful: https://mcuoneclipse.com/2019/10/06/linking-bootloader-applications-with-eclipse-and-freemarker-scri...

 

I hope this helps,

Edwin.