No such file or directory: debugging Makefile project with CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-04 2: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.
- Labels:
-
ST boards
-
STM32F0 Series
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-04 1: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-04 2: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-04 3:42 AM - edited ‎2025-02-04 3: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-04 4: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-02-04 1: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
