2024-10-09 11:50 AM
Hi,
when i try to build my current project i get: called object is not a function or function pointer in the stm32f103xb.h for whatever peripheral i use. For example
stm32f103xb.h:657:29: error: called object is not a function or function pointer
657 | #define I2C2 ((I2C_TypeDef *)I2C2_BASE)
even though it appears to be properly defined in stm32f103xb.h.
any ideas why this happens?
thanks in advance
MCU: STM32f103C8T6
CubeIDE Version: 1.16.1
2024-10-09 01:02 PM
One or more of the above identifiers are probably defined elsewhere in your code with a different meaning. Try to start with a minimal project including stm32f103xb.h only. You may also use your IDE search functions or grep or such to find all occurences of those identifiers in your project
hth
KnarfB
2024-10-09 06:03 PM
Check stm32f1xx_hal_conf.h is pulling in I2C modules via the defines.