2024-06-20 05:00 AM
Good morning,
I am writing for assistance on a problem that is occurring frequently in using STM32CubeIDE and STM32CubeMX.
Created a project from CubeMX with the configurations for an STM32 H7 and developed with CubeIDE, what happens is that if I make changes to the .ioc file again from CubeMX upon subsequent recompilation on CubeIDE "undefined reference to ..." errors are generated for all the HAL library functions in the project.
I am using Version: 1.15.1 for CubeIDE and Version 6.11.1 for CubeMX
Can you provide me with a solution to the problem that occurs both using CubeMX from separate software and within the IDE
Thank you
2024-06-20 05:19 AM - edited 2024-06-20 05:21 AM
please check if you have #include "stm32f0xx_hal.h" in your main.h . This file as all the necessary definitions.
There will be another file halXXXXconf.h also in your project core/inc
2024-06-20 05:33 AM
Hi thanks for the answer,
Why should I include stm32f0xx_hal.h if my system is based on h7?
The library files are present in main.h, I included #include "stm32h7xx_hal.h" in fact at the beginning just created the project everything works and I can develop.
Everything changes when I make a change in the .ioc file. Generating the new configuration code with the change, for example adding a new GPIO, the problem occurs.
If I create a new project from the same .ioc everything goes back to working as before
Translated with DeepL.com (free version)
2024-06-20 05:59 AM
Sorry it .not stm32f0xxhal, it's hal for your processor
2024-06-20 06:00 AM
Sorry it's for stm32f030, it was a typo, it has to be hal for your processor.
2024-06-21 09:28 AM
I have done other tests, but the problem remains.
I initialize a new project with an .ioc file and everything works correctly. I make changes even as simple as adding a GPIO and when I recompile the project, it loses the HAL library references.
Can anyone help me with this?
2024-06-21 09:45 AM
There are known cases when Eclipse (CubeIDE) corrupts the project after external changes and refresh. Of course this does not reproduce always, but occurred for me many times (and then returned to normal by itself). What to do: keep your project in version control. In case of problems after re-generation by CubeMX, compare and revert unwanted changes.
2024-06-21 10:45 PM
Can you send the zip of your project directory with the original configuration, so that I will open it in my computer and make changes to GPIO and see what happens.. Let us try