MCUXPresso IDE:What is the link script generation mechanism

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

MCUXPresso IDE:What is the link script generation mechanism

跳至解决方案
3,936 次查看
Vinos
Contributor III

CPU:I.MX RT1176

IDE:MCUXPresso IDE 11.8

 

In the I.MX series of microcontrollers, headers need to be filled in order to let the L1 BootLoader know how to boot the program. One of these fields is the XMCD, which can be used to initialize the peripherals of FlexSPI or SEMC interfaces.

I added an XMCD component through MCUXPresso IDE, but now there is a problem that the automatically generated link script does not declare the .boot_hdr.xmcd_data field, so the sections in xmcd.c are not linked into the bin file.

If I uncheck Manage Link Script and manually modify the .ld file in the Debug directory to add an xmcd section, then the xmcd section can be filled. However, if I want to change or delete some sections through the GUI of MCUXPresso IDE in the future, it will be very troublesome.

Is this a bug in MCUXPresso IDE? How should I change its link script generation mechanism?

0 项奖励
回复
1 解答
3,886 次查看
ErichStyger
Specialist I

The IDE uses 'Freemarker' scripts for the generated linker files (see the user manual or how I use it here: https://mcuoneclipse.com/tag/freemarker/ ).

That way you can change or update with local script files the generated linker file.

I hope this helps,

Erich

在原帖中查看解决方案

0 项奖励
回复
3 回复数
3,887 次查看
ErichStyger
Specialist I

The IDE uses 'Freemarker' scripts for the generated linker files (see the user manual or how I use it here: https://mcuoneclipse.com/tag/freemarker/ ).

That way you can change or update with local script files the generated linker file.

I hope this helps,

Erich

0 项奖励
回复
3,875 次查看
Vinos
Contributor III
As long as you create a "linkscripts" directory and then create some .ldt files, can the "Manage linker script" function of the MCUXPresso IDE generate link files based on these .ldt files?

Is there a detailed syntax? Does this directory name have to be "linkscripts" and what are the requirements for the file names in the directory?

Thanks for you reply.
0 项奖励
回复
3,903 次查看
Omar_Anguiano
NXP TechSupport
NXP TechSupport

By default, MCUXpresso IDE projects use a managed linker script mechanism that automatically generates a linker script file without user intervention. This approach is helpful for most of the users but there are some specific scenarios where you would want to use a custom one.

Apparently, this is done only with DCD, for xMCD you need to add it manually. 
I consider helpful that this is added to MCUXpresso as DCD is added so let me inform the corresponding team about this. 

Best regards,
Omar