cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate system_stm32g0xx.c file after regenerating

CTapp.1
Senior II

I've got a project that has the following files in the tree view:

CTapp1_1-1745333196183.png

All is well if I clean and build, but if I open the .ioc and "Generate Code", the tree changes to:

CTapp1_2-1745333269644.png

and the project then fails to build due to a duplicate system_stm32g0xx.c file.

Why is this getting added and how do I stop it?

I am using STM32CubeIDE V1.18.1.

5 REPLIES 5
Ghofrane GSOURI
ST Employee

Hello @CTapp.1 

First let me thank you for posting.

Could you please provide your IOC.

I 'will be waiting for your feedback.

THX

Ghofrane

CTapp.1
Senior II

Thanks for the quick response - file is attached.

Hello @CTapp.1 

I used your IOC to generate the code multiple times and each time the build finished without any errors or warnings, and your project architecture did not change.

GhofraneGSOURI_0-1745335969962.png

Let's try to close STM32CubeIDE and STM32CubeMX and go under C:\Users\XXXXXX then delete .stm32cubeide and .stm32cubemx.

THX

Ghofrane 

 

Thanks - I've tried that, but the results are the same.

CTapp.1
Senior II

I've just uninstalled and reinstalled CubeIDE (V.1.18.1), but that has also made no difference.