MCUXpresso 11.7.0: Changed behaivoir in build

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

MCUXpresso 11.7.0: Changed behaivoir in build

Jump to solution
1,365 Views
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?

Tags (1)
1 Solution
1,312 Views
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

 

View solution in original post

0 Kudos
Reply
4 Replies
748 Views
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 Kudos
Reply
1,313 Views
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 Kudos
Reply
1,297 Views
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 Kudos
Reply
1,341 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @Svenifax 

 

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

 

BR

Alice