Skip to main content
Jan Wustrau
Associate II
Dec 4, 2023 8:46 PM UTC
Question

STM32CubeIDE 1.14.0 pattern recipe problem

Hi,

I have project for STM32F405 created manually. Project is using fixed GCC 4.92014q4.

After updating STM32CubeIDE to version 1.14.0 i got warnings shown below.

Compiler option "Cyclomatic Complexity" is disabled.

File "subdir.mk" contains this rule:

# Each subdirectory must supply rules for building sources it contributes
Src/%.o Src/%.su Src/%.cyclo: ../Src/%.c Src/subdir.mk

s1.png

 

How to remove this warnings?

20 replies

ST Technical Moderator
Dec 5, 2023 10:29 AM UTC

Hello @Jan Wustrau 

First let me thank you for reporting this issue.

I raised this internally along to our development team for fix.

Internal ticket number: 167964 is created (PS: this is an internal tracking number and is not accessible or usable by customers)

Thank you,

Souhaib

To give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Explorer
Dec 16, 2024 10:35 AM UTC

Hello, I would like to ask You if there is any progress with this issue. Today I try new version of ARM GNU Toolchain v14.2 together with actual version of STM32CubeIDE (1.17.0) and I encountered the same problem, where automatically generated makefile recipes do not take into account (disabled) "Cyclomatic Complexity" compiler setting.

 

Thanks to this, MAKE already generates the above listed warning:

 

Kovy_0-1734345200335.png

 

Thank You

 

Peter

Associate
Jun 18, 2025 10:52 AM UTC

Try downgrade make.exe to older version. I overwrite make.exe in CubeIDE v1.18 (used with GCC v14.2) with version from v1.13 (GNU Make 4.2.1_st_20200221-0903_longpath) and problem with "pattern recipe" disperse. Make directory: STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.make.XXX\tools\bin.

 

Jan Wustrau
Associate II
Jan 16, 2024 12:20 PM UTC

Hello,

Is there any solution for this issue?

Associate II
Jan 16, 2024 8:55 PM UTC

Hello Jan,

another post relates to this topic : https://community.st.com/t5/stm32cubeide-mcus/stm32cubeide-1-14-0-flto-build-warning/td-p/614249

This bug was introduced by release 4.4 of GNU Make. Unfortunately as of today this is the latest, so you will have to wait for the official fix !

If you can't wait you can stick to a previous version available for download here.

Visitor II
Jul 22, 2024 1:02 PM UTC

My understanding is that this is not a bug introduced by the the update to Make, but an existing bug in the Makefile that is now highlighted by the new new warning Make 4.4.

The Makefile rule specifies multiple targets (the .o file and the .cyclo file).  However, when the cyclomatic complexity option is disabled, the recipe doesn't generate the .cyclo file.  Make is correctly warning you that you ran a recipie that didn't generate the target file.

When CubeIDE generates the makefile, it shouldn't include the .cyclo target if cyclomatic complexity is disabled.

In a future release of Make, this warning will be converted to an error, and CubeIDE will be unable build projects where this option has been disabled if the way the Makefiles are generated is not fixed.

Explorer
Nov 16, 2024 10:12 AM UTC

Hello,

I have the same issue with my STM32CubeIde project. In the past, I enabled the Cyclomatic Complexity option for this project. The subdir.mk file was updated with the following code:

# Each subdirectory must supply rules for building sources it contributes
Core/Src/%.o Core/Src/%.su Core/Src/%.cyclo: ../Core/Src/%.c Core/Src/subdir.mk

And this warning appears during the compilation:

pattern recipe did not update peer target 'Core/Src/main.cyclo'. subdir.mk /MyProject/Debug/Core/Src line 34 C/C++ Problem

Trying to comment the line in the subdir.mk file or simply delete it do not solve the issue.

I'm agree with the solution When CubeIDE generates the makefile, it shouldn't include the .cyclo target if cyclomatic complexity is disabled.

My STM32CubeIDE version:
Version: 1.16.1
Build: 22882_20240916_0822 (UTC)

Regards

Pierrick

Jan 17, 2024 8:23 AM UTC

Hi @Jan Wustrau ,

I also had this warning popping up after upgrading to 1.14.1 from 1.13.0, despite having compiler option "Cyclomatic Complexity" disabled just like you.

In order to get rid of it I enabled the option "Cyclomatic Complexity", and it was enough. It is NOT the solution I wanted (the subdir.mk files should be regenerated correctly when checking or unchecking the option), but it removes the warning, without (in my case) any impact on the compilation time.

By the way, have you tried to manually remove

Src/%.cyclo

from subdir.mk ?

Have a nice day.

Jan Wustrau
Associate II
Jan 17, 2024 8:17 PM UTC

Hi,

subdir.mk files are recreacted at each build, so manual removing this rule is not working.

Of course i tried to enable cyclomatic complexity, but i'm using old version of toolchain (2014) and this option is not supported:

arm-none-eabi-gcc: error: unrecognized command line option '-fcyclomatic-complexity'

 

GMock.1
Associate
Jun 17, 2025 2:01 PM UTC

Still not fixed in v.1.18.1.

I see three ways to trigger this issue (this kind of warning):

- Cyclomatic complexity disabled

- Enable stack-usage analysis disabled

- custom flag "-flto" enabled

 

They all prevent the generation of .su and/or .cyclo files. The missing files then trigger the warning.

If disabling the first two checkboxes would modify the generated "subdir.mk" appropriately, then it would also be fine for the case of the custom LTO flag, as long as one only uses it in combination with the disabled former options.

Associate III
Aug 25, 2026 2:46 PM UTC

Still not fixed in 2.1.1.

Pavel A.
Aug 30, 2026 8:42 AM UTC

​@avidroneg Still using old GCC compiler with CubeIDE 2.1? Why not to update?

Associate III
Aug 31, 2026 1:06 PM UTC

What? This doesn’t have anything to do with gcc. This is a message from make caused by the makefile that was generated by Cube.

SKled.1
Senior
Oct 30, 2026 12:45 PM UTC

Still not fixed in 2.2.0 ;)
And I am using GCC 15.3rel2, not “old compiler”.

Pavel A.
Oct 30, 2026 10:00 PM UTC

What not fixed - “pattern recipe did not update peer target … cyclo”? 

Have you disabled the cyclomatic complexity option? Also, try the internal builder (though it has its own minor quirks).

SKled.1
Senior
Nov 3, 2026 2:44 PM UTC

Yes, disabled on purpose. I mean, I don’t care that much about it, but the downloaded-from-arm (as opposed to ST-provided, which don’t have the newest) compiler does not like that option and hence won’t build the code - I do care about that.

I have used the internal builder in pure Eclipse CDT before, but thought there may be a reason why default setup by ST uses the other one, having vague memories of stuff not working also ;) But I’ll try that & see.