Change of -finline-limit in MCUXpresso v11.6.0?

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

Change of -finline-limit in MCUXpresso v11.6.0?

Jump to solution
1,467 Views
aberger
Contributor V

I recently upgraded MCUXpresso from v11.2.1 to v11.6.0 and tried to rebuild a project developed in 11.2.1. I receive the following compiler warning:

warning: inlining failed in call to '<FunctionName>': --param max-inline-insns-single limit reached [-Winline]

I have made no other changes to the project code or project settings. According to the C/C++ Build Settings that I have configured, -finline-limit is not specified, and so it should revert to the default value. 

Why would v11.6.0 fail to inline, while v11.2.1 succeeded?

Tags (1)
0 Kudos
1 Solution
1,452 Views
bobpaddock
Senior Contributor III

There are two possibilities:

Newer versions of GCC rarely make code that is smaller that past versions.
So the version of GCC that ships with 11.6.0 is making the function larger and is now hitting the limit.

Newer versions of GCC improve the error reporting (they are trying to play catch up with CLANG).
The failure may have been there in the past, the function was not inlined, and it was not reported in the older version.

View solution in original post

0 Kudos
6 Replies
1,432 Views
aberger
Contributor V

Is there a way to specify the GCC version in the Project Settings? To avoid having to keep a legacy setup, I'd like to not have my build output tied to the MCUXpresso version.

0 Kudos
1,394 Views
aberger
Contributor V

It seems you can also check the gcc version using the following: 

From MCUXpresso project, right-click on Project and select Utilities > Open Command Prompt here.

From the command prompt, execute:

arm-none-eabi-gcc --version

 

I found the following:

MCUXpressov11.2.1v11.6.0
arm-none-eabi-gcc9.2.1 2019102510.3.1 20210824
0 Kudos
1,427 Views
ErichStyger
Senior Contributor V

You can check the version of the GCC with a macro:

https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

As for using different versions of gcc/toolchains: you can do this with https://eclipse-embed-cdt.github.io/, but this means a different project setting.

Erich

0 Kudos
1,451 Views
ErichStyger
Senior Contributor V

The IDE 11.6.0 is using a different/new compiler, so this likely explains it.

0 Kudos
1,453 Views
bobpaddock
Senior Contributor III

There are two possibilities:

Newer versions of GCC rarely make code that is smaller that past versions.
So the version of GCC that ships with 11.6.0 is making the function larger and is now hitting the limit.

Newer versions of GCC improve the error reporting (they are trying to play catch up with CLANG).
The failure may have been there in the past, the function was not inlined, and it was not reported in the older version.

0 Kudos
1,431 Views
aberger
Contributor V

It seems there may be a bit of both going on. v11.6.0 reported 5 different functions that failed to inline. From what I can tell, 4 of those were properly inlined when compiled by v11.2.1, and one was not (but no warning was issued).

0 Kudos