cancel
Showing results for 
Search instead for 
Did you mean: 

called object is not a function or function pointer in stm32f103xb.h

Oskar2211
Visitor

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

1 REPLY 1
KnarfB
Principal III

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