2024-02-04 11:03 AM
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?
2024-02-04 01:03 PM - edited 2024-02-04 01:03 PM
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.
2024-02-05 10:44 AM
Many files are deleted such as below. What could be the reason behind and how can I avoid it ?
2024-02-05 11:56 AM
Files from 2020, so very old project, most likely using different CubeMX verson and HAL library version.
2024-02-05 08:02 PM
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.
2024-02-06 06:27 AM
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.
2024-02-06 11:17 AM
2024-02-06 12:55 PM
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.