Hello, I am using STM32Cube lib to development my project which include both spi and i2c communication.
So I develop the project based on the SPI example in STM32Cube example package.
However the initial project do not include stm32l4xx_hal_i2c.c and stm32l4xx_hal_i2c.h. So I added them by right click the project driver group to add the two files into project. The path is well reveiwed. there is no problem with path. .h from inc and .c from src folder.
However, the stm32l4xx_hal_i2c is added, but its dependancies do not include stm32l4xx_hal_i2c.h. And the project can not be built successfully. Showing :
STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.axf: Error: L6218E: Undefined symbol HAL_I2C_Init (referred from hsensor_i2c.o).
STM32L432KC_NUCLEO\STM32L432KC_NUCLEO.axf: Error: L6218E: Undefined symbol HAL_I2C_Master_Receive_IT (referred from hsensor_i2c.o).
HAL_I2C_Master_Receive_IT and HAL_I2C_Init are both from stm32l4xx_hal_i2c.h.
Could any one help me with this ? Is there configuration files to be modified ?