2025-02-04 02:54 AM
Hello,
I have generated a makefile project on CubeIDE for STM32WB55RG and I'm trying to debugging it on CubeIDE . After a research on the forum I got to know that this is achievable and set up build settings accordingly.
When I try to debug I get the error:
../Drivers/STM32WBxx_HAL_Driver/Src/stm32wbxx_hal.c:35:10: fatal error: stm32wbxx_hal.h: No such file or directory
35 | #include "stm32wbxx_hal.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
I've checked my file system and the file does exist and on my Makefile file I have it included (4th code line)
# C includes
C_INCLUDES = \
-ICore/Inc \
-IDrivers/STM32WBxx_HAL_Driver/Inc \
-IDrivers/STM32WBxx_HAL_Driver/Inc/Legacy \
-IDrivers/CMSIS/Device/ST/STM32WBxx/Include \
-IDrivers/CMSIS/Include
Still don't understand why the file can't be found. Any clue?
Solved! Go to Solution.
2025-02-04 01:41 PM
I finally got the project building and debugging. I noticed that many unwanted files were present on my project tree (rtc, cmsis_os , etc.). I started to remove them one by one from the build and errors were going down. So, I went back to CubeMX-> project manager->Code generator and noticed that I accidentally had Copy all used libraries into the project folder checked up instead of Copy only the necessary library files.
After that I still wasn't able to debug due to not having the MCU set up. This post helped me. Just make sure to choose the MCU ARM GCC toolchain on the step 1.
Thank you anyways @Javier1
2025-02-04 02:59 AM
>>When I try to debug I get the error:
Your makefile is not debugging, i guess you need to add the
IDrivers/CMSIS/Device/ST/STM32WBxx/Include \
to the path so CubeIDE knows, yeah i know, the famous "AdD iT tO ThE PaTh"
Right click on your project in project explorer-> properties->C/C++ general -> Path and Symbols
2025-02-04 03:42 AM - edited 2025-02-04 03:42 AM
I ended up adding all the files under C_INCLUDES from my makefile to the path and symbols. That error has gone and I was presented with 298 new errors. Errors like unsolved variables, not included standard c libraries,... . It seems like a generation error. It's just too much manual job to do.
2025-02-04 04:25 AM
I added the symbols under C_DEFS on the makefile to my CubeIDE symbols and now I got only 68 errors to work on.
2025-02-04 01:41 PM
I finally got the project building and debugging. I noticed that many unwanted files were present on my project tree (rtc, cmsis_os , etc.). I started to remove them one by one from the build and errors were going down. So, I went back to CubeMX-> project manager->Code generator and noticed that I accidentally had Copy all used libraries into the project folder checked up instead of Copy only the necessary library files.
After that I still wasn't able to debug due to not having the MCU set up. This post helped me. Just make sure to choose the MCU ARM GCC toolchain on the step 1.
Thank you anyways @Javier1