MCUXpresso 11.7.0: Changed behaivoir in build

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

MCUXpresso 11.7.0: Changed behaivoir in build

跳至解决方案
1,561 次查看
Svenifax
Contributor III

Hello,

in MCUXpresso 11.7.0 my projects can't build anymore in the linker step.

To avoid the to manage the order of my libraries during linking,  I'm using the -Wl,--start-group -lA -lB  -Wl,--end-group option provided by gcc linker.

This was done by editing the Command line pattern in:

ProjectProperties->C/C++ Build->Settings: MCU C++ Linker->Command Line pattern:

${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Wl,--start-group ${INPUTS} -Wl,--end-group

This was working perfectly up to MCUXpresso version 11.6.1

In MCUXpresso version 11.7.0 this line doesn't work anymore, because all the libraries are not included in the ${INPUTS} variable. When looking at the command line the libraries are listed behind -Wl,--end-group. So I get linker errors if the order of libraries isn't correct.

This is only happen when using external builder, when using internal builder everything is fine.

Is it possible to recover the old behaivoir in the next MCUXpresso release?

标记 (1)
1 解答
1,508 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Indeed, MCUXpresso IDE v11.7.0 comes with a newer CDT than the one from v11.6.1. There was a change related to your finding - see the first item under the Build section from [1]. The change is related to bug [2] from CDT.

Long story short, the new CDT introduced a new ${EXTRA_FLAGS} argument in the linker's command line pattern. Also, there's no objects.mk (previously used for passing user objects and libraries) generated anymore for automatically managed projects.

You should update the project settings based on the given information. I don't think the behavior from current CDT is going to change any time soon.

Regards,
MCUXpresso IDE Support

[1] https://wiki.eclipse.org/CDT/User/NewIn107

[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=577263

 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
944 次查看
scornelius
Contributor III

I made this change and under MCUXpresso, everything is building correctly for my board, and library projects.
But, our server based Linux build system is using objects.mk and just the compilers, not MCUXpresso.
Is there a suggested way to export ${EXTRA_FLAGS} into an objects.mk file?
Thank you,
  Steve
PS: using IDE11.8.1

0 项奖励
回复
1,509 次查看
lpcxpresso_supp
NXP Employee
NXP Employee

Indeed, MCUXpresso IDE v11.7.0 comes with a newer CDT than the one from v11.6.1. There was a change related to your finding - see the first item under the Build section from [1]. The change is related to bug [2] from CDT.

Long story short, the new CDT introduced a new ${EXTRA_FLAGS} argument in the linker's command line pattern. Also, there's no objects.mk (previously used for passing user objects and libraries) generated anymore for automatically managed projects.

You should update the project settings based on the given information. I don't think the behavior from current CDT is going to change any time soon.

Regards,
MCUXpresso IDE Support

[1] https://wiki.eclipse.org/CDT/User/NewIn107

[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=577263

 

0 项奖励
回复
1,493 次查看
Svenifax
Contributor III

Thanks for help, ${EXTRA_FLAGS} have to used.

This line works:

${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} -Wl,--start-group ${EXTRA_FLAGS} -Wl,--end-group

 

Regards,
Sven

0 项奖励
回复
1,537 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Svenifax 

 

I will report your request to IDE team, thanks for your sharing.

 

BR

Alice