cancel
Showing results for 
Search instead for 
Did you mean: 

After modifying .ioc file, STM32 CUBE IDE removes some files which causes the build issue.

demir
Senior II

Hi All,

I already hold a running code which gets compiled perfectly. When I added RNG peripheral by modifying .ioc, I get many errors as build outcome. I have analyzed the root cause and I have found out, generating code after modifying .ioc file removes many files, such as some headers that were already in the previously built project.

Is there any way to preserve the previously successfully built project and just add the new files only such as whatever related with RNG peripheral?

 

 

7 REPLIES 7
TDK
Guru

 

Only put your code within USER CODE sections. Don't put files in folders that CubeMX controls. The Core src/inc folder is fine. What files did it delete, and from where?

If your IOC generates code that does not compile due to missing files, please attach it.

If you feel a post has answered your question, please click "Accept as Solution".
demir
Senior II

Many files are deleted such as below. What could be the reason behind and how can I avoid it ?

 

demir_0-1707158643735.png

 

TDK
Guru

Files from 2020, so very old project, most likely using different CubeMX verson and HAL library version.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you.

So, what you are saying is that, the files that I imported includes files from Cube MX version 2020. Is that so ?

If yes, is there any way to fix it ?

Btw, I am using STM32 Cube IDE 1.14.0.

TDK
Guru

I don't have any history on your project. If it were me, I would update the F4 package to the latest version (Help -> Manage Embedded...), generate code, and see if it compiles. If it does not, attach the IOC here and I will look at it.

 

If you feel a post has answered your question, please click "Accept as Solution".
demir
Senior II

I already have the latest version that is 1.28.0.

Please find .ioc file attached.

 

TDK
Guru

The project generates code and builds successfully for me without errors.

The stm32f4xx_hal_can file is deleted as the project does not have any CAN peripherals enabled. Similar story for the PCD file.

If you feel a post has answered your question, please click "Accept as Solution".