cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Cube IDE - cubeMX includes multiple source files that results in multiple definition errors

selcukozb
Associate III

Time to time cubeMX configurator includes c files in multiples, which I can clear by deleting one of them. But cubeMX insists adding multiples again in each regeneration. In freshly generated projects it doesn't do so. That issue appears only when I attempt to make a revision using the cubeMX configurator.

I am using cube IDE version 1.4.2 and :

cube MX

Version: 6.0.1-RC3

Build: 20200810-1643 (UTC)

In the attached image you can see multiple includes of system_STM32F1xx.c file. Project builds smoothly when I delete one of them.

11 REPLIES 11
prain
Senior III

did you generate code for other IDEs before generating for CubeIDE?

I had similar problem when generated project for Keil and then generated for cubeMX. Maybe starting a new clean project and adding your source helps.

selcukozb
Associate III

Thanks for your attention prain. No, the code has been generated using cube IDE. Newly created projects do not have such a problem. After several editions and modifications using cubeMX configurator -not stand alone one, this is done under the hood of cube IDE- all of a sudden, it starts to create duplicate files under src, and cmsis/template folders.

I still have this phenomena, but I learned to survive by deleting one of the multiples. Until I discovered where to find the the multiples, I had been regenerating the complete project from scratch, which was a painful task.

I am disappointed that somebody from ST, haven't read and commented on that. There were some threads in the community on this topic, recommending editing make files etc, but no solution related to the cubeIDE tool.

Kind regards,

Mickaël Bucher
Associate II

Hi,

I have the same problem ?

Do you solve this ?

If yes, can you help me to resolve this ?

kind regards.

Which IDE release & OS are you relying on ? Which target device ?

Such post was initiated based on IDE 1.4.2. Current is 1.6.1.

If possible attach .ioc file

Mickaël Bucher
Associate II

I use STM32CubeIde 1.6.1 and STM32CubeMx 6.2.1-RC2

Hi Mickael,
No, this issue has not been resolved since then. There have been many OS updates and cubeMX updates since that inquiry.
I thought this a problem no one else encountered. Nobody from ST Support team paid attention too, despite my repeated inquiries.
Problem does not happen with freshly created projects, but after repeated reconfigurations using cubeMX under CubeIDE.
So I have been surviving by deleting the duplicate file in drivers/CMSIS/Device/ST/STM32F1xx/source/Templates/ folder. (In case of system_stm32f1xx.c file, but it happens in other CPU types, also.)
I hope this correspondence will get some attention from ST experts.
Kind regards,
RYudi.1
Associate

Hi,

I have the same problem!!!

0693W00000FAe7qQAD.png

selcukozb
Associate III

Hi RYudi,

Unfortunately, there is no attention from ST on that subject. It seems there are not many complaints on that issue, so ST does not give any priority to it.

Continue to survive with this.

Regards,