1 Reply Latest reply on Aug 9, 2019 6:04 AM by NoriakiT_91

    Function is undefined although already declared in header file (.h)


        Hi everyone,


      I am using CY8CKIT-062-BLE kit, PSoC Creator 4.2 (

      My idea is using CM4 core to capture GPIO interrupt (SW2 button), set a flag variable then using CM0 to do something (such LED toggling...) when this flag variable is set.

      GPIO Int is handled by CM4 core, so that I MUST place "User_GPIO.c" file in CM4 folder (otherwise i got error with variable &SysInt_Switch_cfg).

      In this "User_GPIO.c" I created 2 functions: User_SetVal_Pin_SW2_Int_Flag(), and User_GetVal_Pin_SW2_Int_Flag() to clear and get value of that interrupt flag, respectively. Their prototypes are also declared in "User_GPIO.h" under folder "Shared Files" .


      Core CM0 processes general system events by calling function Get_Event() which calls to User_GetVal_Pin_SW2_Int_Flag() to check the Int_flag continuously.

      Function Get_Event() located in "User_Event_Interface.c", and this c file already got this line #include "User_GPIO.h" .

      However, i got build error with msg PSoC6_IoT.cydsn/User_Event_Interface.c:49: undefined reference to `User_GetVal_Pin_SW2_Int_Flag'


      Can anyone please help me to fix this?