Skip to main content
Associate III
July 24, 2024
Solved

Application/User/Core/main.d:1: *** multiple target patterns. Stop.

  • July 24, 2024
  • 2 replies
  • 2285 views

Why is this error very hard to find?
I cannot find the exact reason this is happening?
I have project say named Project_1 that works properly (This is created using TouchGFX on STM32H735G- DK board)

now if i copy this project manually and paste it in another dir and open that in Stm32cubeide and try building
building works once for second time the error occurs

I also tried copying my project codes after crteating a new project using touchgfx instead of just copying existing project
still same error

Note that i have my own files in separate folders that i added in all the projects

after cleaning the project - 1st time build ok - 2nd time same error

I also tried copy pasting the main.d file from my Project_1 into the new project but same error


STM32CubeIDE

Version: 1.16.0

Build: 21983_20240628_1741 (UTC)

 


STM32CubeMX - STM32 Device Configuration Tool

Version: 6.12.0-RC9

Build: 20240628-1431 (UTC)

 

Best answer by vishnu_illikkal

I found the Cause for the  `Application/User/Core/main.d:1: *** multiple target patterns. Stop.` error.
It was because of multiple inclusions of the header files.
I was including all the needed header files for the c files inside its h file this caused the error when the project grew.
Now i changed it into the source files so now the error is gone.

2 replies

Pavel A.
Super User
July 24, 2024

* Check if path contains spaces or weird characters

* Delete all *.d files in pre-build step ?

vishnu_illikkalAuthorBest answer
Associate III
August 13, 2024

I found the Cause for the  `Application/User/Core/main.d:1: *** multiple target patterns. Stop.` error.
It was because of multiple inclusions of the header files.
I was including all the needed header files for the c files inside its h file this caused the error when the project grew.
Now i changed it into the source files so now the error is gone.