cancel
Showing results for 
Search instead for 
Did you mean: 

Generated makefile has duplicated entries for some source files

Raivis Strogonovs
Associate II
Posted on November 01, 2017 at 20:39

CubeMX 4.23.  

Board nucleo-f429zi and STM32CubeF4 is of v1.17.0

Compiling with makefile arm-gcc-none-eabi       version: 5.3 2016q1

 All is done on linux

I just noticed another thing,

Completely freshly generated makefile has duplicate entries for some of the source files:

I see gpio.c, main.c, usb_otg.c have been duplicated, maybe more, it's just some I've noticed by quickly reading the list my self. 

C_SOURCES = \

Middlewares/Third_Party/LwIP/src/netif/ppp/ccp.c \

Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c \

Middlewares/Third_Party/LwIP/src/core/ipv6/nd6.c \

Src/gpio.c \

Src/gpio.c \

Here is a link to full makefile generated by cubemx

https://pastebin.com/fc3ECzki

 
5 REPLIES 5
Imen.D
ST Employee
Posted on November 02, 2017 at 11:11

Hello

Strogonovs.Raivi

This issue is raised internally to CubeMx team for investigation and we will be back to you as soon as possible.

Thanks for your contribution.

Best Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on November 08, 2017 at 20:05

Hi,

I'm not sure why it happened, but once I deleted all the entries under C_SOURCES = \....

In Makefile it has been working since. 

Maybe by accident I somehow locked the file while generating the code from CubeMX

Posted on February 12, 2018 at 15:15

hello

Strogonovs.Raivi

,

This is not an issue on your side but an issue when CubeMX generates the code with makefile.

As you say, the workaround is to suppress every duplicated source files and it compiles and links successfully after.

Sorry for the inconvenience it may cause.

Our development teams are working on that point, I will keep you inform as soon as the correction is available in a CubeMX release.

BR. Jeanne

Houda GHABRI
ST Employee
Posted on June 04, 2018 at 09:56

Hi

Strogonovs.Raivi

,

The correction is available in CubeMX 4.0 version (available this week).

Regards,

Houda

kking.11
Associate

Greetings:

I am having the same issue with v5.0.1

Each time I try to regenerate the build files for uVision, I get 3 duplicate files - two are links back to the exact same file :

  • in Drivers/CMSIS/ : ../Src/system_stm32f7xx.c
  • in Application/User : ..\Src\quadspi.c

and one where the files were in different locations, but the same file

  • in Drivers/STM32F7xx_HAL_Driver : ../Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_qspi.c
  • in ..\Src directory

Is this a different bug, or did the fix not get moved into 5.0?

If it is different, how do I prevent it from happening again (I'm moving to a different project soon and need to document or fix this issue) ?

Thanks.