cancel
Showing results for 
Search instead for 
Did you mean: 

STMCubeIDE won't include SPI HAL driver

RMod
Associate

I am putting together a project for the U031 Nucleo board based on the DAC signal generation example project. From the configuration page I have added SPI, as well as TIM2 and the other required drivers (DAC, DMA, EXTI, TIM1). When it generates code, it looks like everything is there in way of configuration but stm32u0xx_hal_spi.c is not included in the drivers to be compiled. When I try to build the project the HAL_SPI_INT function cannot be found. It seems to find all the correct header files and the configuration in stm32u0xx_hal_config.h is correct and SPI is defined but it is not included in the make. It shows all the other required drivers in the driver directory but not spi.  The stm32u0xx_hal_spi.c and stm32u0xx_hal_spi_ex.c files are both in the same project folder with all the other drivers. I have checked the auto generated submake files and spi is not listed.

 If I build an example with just SPI then the driver is included. 

Originally I had the project compiling and working correctly without SPI but when I tried to add SPI no luck. I have tried building a new project with all the needed drivers but I see the same result, no SPI.

It looks like the project does not get correct configured by the IDE configuration tool. The project settings need to be edited but I can't find the right place to modify.

Any suggestions on how to get the SPI driver to be included in the build would be much appreciated. 

2 REPLIES 2
Mahmoud Ben Romdhane
ST Employee

Hello @RMod ,

First let me thank you for posting and welcome to the ST Community.

For more investigation, I suggest that you provide your Ioc.File and the STM32CubeIDE version.

Thanks.

Mahmoud.

Thanks for getting back to me.

I am using STMCubeIDE 1.17.0.

Attached is the .ioc file for this project.