2025-11-25 7:03 PM
I am encountering a build failure in the I2C_OneBoard_Communication_PollingAndIT_Init project after integrating the X-CUBE-MEMS1 software expansion pack.
D:/STM32Cube/I2C_OneBoard_Communication_PollingAndIT_Init/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma.c:185:10: fatal error: stm32wbaxx_hal.h: No such file or directory
185 | #include "stm32wbaxx_hal.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
D:/STM32Cube/I2C_OneBoard_Communication_PollingAndIT_Init/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_dma_ex.c:478:10: fatal error: stm32wbaxx_hal.h: No such file or directory
478 | #include "stm32wbaxx_hal.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Drivers/STM32WBAxx_HAL_Driver/subdir.mk:46: Drivers/STM32WBAxx_HAL_Driver/stm32wbaxx_hal_dma.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Drivers/STM32WBAxx_HAL_Driver/subdir.mk:48: Drivers/STM32WBAxx_HAL_Driver/stm32wbaxx_hal_dma_ex.o] Error 1
D:/STM32Cube/I2C_OneBoard_Communication_PollingAndIT_Init/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_i2c.c:323:10: fatal error: stm32wbaxx_hal.h: No such file or directory
323 | #include "stm32wbaxx_hal.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Drivers/STM32WBAxx_HAL_Driver/subdir.mk:50: Drivers/STM32WBAxx_HAL_Driver/stm32wbaxx_hal_i2c.o] Error 1
D:/STM32Cube/I2C_OneBoard_Communication_PollingAndIT_Init/Drivers/STM32WBAxx_HAL_Driver/Src/stm32wbaxx_hal_i2c_ex.c:56:10: fatal error: stm32wbaxx_hal.h: No such file or directory
56 | #include "stm32wbaxx_hal.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Drivers/STM32WBAxx_HAL_Driver/subdir.mk:52: Drivers/STM32WBAxx_HAL_Driver/stm32wbaxx_hal_i2c_ex.o] Error 1
"make -j8 all" terminated with exit code 2. Build might be incomplete.Environment:
CubeIDE 2.0.0, CubeMX 6.16.0, WBA FW 1.8.0, X-CUBE-MEMS1 12.0.0
Solved! Go to Solution.
2025-12-04 5:48 PM
Thank you for your suggestion and for pointing me to that guide. I appreciate you taking the time to help.
I followed the steps in the guide you shared, but unfortunately, the project still failed to build.
After some more digging, I eventually found the solution. The issue was that the X-CUBE-MEMS1 pack requires I2C DMA to be enabled, which was not the default configuration in the base project. I found the answer in this forum post:
https://community.st.com/t5/stm32-mcus/how-to-configure-the-gpdma/ta-p/49412
Once I enabled the appropriate I2C DMA channels in CubeMX and regenerated the code, the build errors were resolved and the project now compiles successfully.
2025-11-27 6:03 AM
Hello @kclauah ,
Check if the header files are missing from the generated project structure and ensure that all necessary files are included in the build.
How to integrate the X-CUBE-MEMS1 package with your project
2025-12-04 5:48 PM
Thank you for your suggestion and for pointing me to that guide. I appreciate you taking the time to help.
I followed the steps in the guide you shared, but unfortunately, the project still failed to build.
After some more digging, I eventually found the solution. The issue was that the X-CUBE-MEMS1 pack requires I2C DMA to be enabled, which was not the default configuration in the base project. I found the answer in this forum post:
https://community.st.com/t5/stm32-mcus/how-to-configure-the-gpdma/ta-p/49412
Once I enabled the appropriate I2C DMA channels in CubeMX and regenerated the code, the build errors were resolved and the project now compiles successfully.