Linker script search paths

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Linker script search paths

跳至解决方案
2,270 次查看
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 项奖励
回复
1 解答
2,248 次查看
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.

 

在原帖中查看解决方案

1 回复
2,249 次查看
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.