This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I WANT ADD THE NFC EXAMPLE AT ble_app_beacon EXAMPLE.

Hi, i'm using nrf52832 uploaded ble_app_beacon example.

I want nrf52832 to work as a beacon and as a nfc tag.

Thus, I added some nfc example code. nfc_t2t_lib.h also added in bla_app_beacon project file.

But, compile result have 2 errors.

 Error: L6218E: Undefined symbol nfc_t2t_emulation_start (referred from main.o).

 Error: L6218E: Undefined symbol nfc_t2t_setup (referred from main.o).

PLZ Can anyone solve this? thank you

 

Parents
  • Hi,

    You need to include the precompiled NFC T2T library for your compiler, found in components\nfc\t2t_lib\nfc_t2t_lib_[compiler].a/lib

    Best regards,
    Jørgen

  • I added components\nfc\t2t_lib folder through keil "Options for Target > C/C++ / Include Paths.
    Is not your advice telling this?

  • This time I tried to combine the nrf \ record_text example with

    the ble_app_hrs_rscs_relay example in the same sdk.

    Other build results appeared.

    error: L6002U : Could not open file..\..\..\components\nfc\t2t_lib\nfc_t2t_keil.lib: No such file or directory.

    Clearly, it works in the record_text example...

    I added "components\nfc\t2t_lib folder through keil "Options for Target > C/C++ / Include Paths." and  I added the some C file after I created the group in the project window like record_text project window.

  • How exactly did you add the .lib file to your project? Did you browse the directories to locate it? The path reported in the linker output seems too short compared to where the lib is located in relation to the ble_app_hrs_rscs_relay example. If you did not move it, the path to the lib should be like this:

    ..\..\..\..\..\..\..\components\nfc\t2t_lib\nfc_t2t_lib_keil.lib

  • Sorry Jorgen.. My answer has confused you. I simply skipped the front part.

    The exact path is:  ..\..\..\..\..\..\..\components\nfc\t2t_lib.

    Now I am testing using the example in the same sdk (nRF5_SDK_15.3.0_59ac345\examples) and it is automatically added to Options for Target.

    The examples used are "nfc / record_text" and "experimental\ble_app_hrs_rscs_relay".

    And  I created the group file in the project window like record_text project window.

      But, an error still occurs...

    The results I just build are..

    Is there a way to solve it?..

  • These are different errors, indicating that you have not included source files for nfc_platform and nrfx_nfct driver. I see you have included nfc_platform.c in your project, also make sure you add the following file:

    modules\nrfx\drivers\src\nrfx_nfct.c

    You also need to add this to your sdk_config.h file to enable the modules:

    // <e> NRFX_NFCT_ENABLED - nrfx_nfct - NFCT peripheral driver
    //==========================================================
    #ifndef NRFX_NFCT_ENABLED
    #define NRFX_NFCT_ENABLED 1
    #endif
    // <o> NRFX_NFCT_CONFIG_IRQ_PRIORITY  - Interrupt priority
     
    // <0=> 0 (highest) 
    // <1=> 1 
    // <2=> 2 
    // <3=> 3 
    // <4=> 4 
    // <5=> 5 
    // <6=> 6 
    // <7=> 7 
    
    #ifndef NRFX_NFCT_CONFIG_IRQ_PRIORITY
    #define NRFX_NFCT_CONFIG_IRQ_PRIORITY 6
    #endif
    
    // <e> NRFX_NFCT_CONFIG_LOG_ENABLED - Enables logging in the module.
    //==========================================================
    #ifndef NRFX_NFCT_CONFIG_LOG_ENABLED
    #define NRFX_NFCT_CONFIG_LOG_ENABLED 0
    #endif
    // <o> NRFX_NFCT_CONFIG_LOG_LEVEL  - Default Severity level
     
    // <0=> Off 
    // <1=> Error 
    // <2=> Warning 
    // <3=> Info 
    // <4=> Debug 
    
    #ifndef NRFX_NFCT_CONFIG_LOG_LEVEL
    #define NRFX_NFCT_CONFIG_LOG_LEVEL 3
    #endif
    
    // <o> NRFX_NFCT_CONFIG_INFO_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_NFCT_CONFIG_INFO_COLOR
    #define NRFX_NFCT_CONFIG_INFO_COLOR 0
    #endif
    
    // <o> NRFX_NFCT_CONFIG_DEBUG_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_NFCT_CONFIG_DEBUG_COLOR
    #define NRFX_NFCT_CONFIG_DEBUG_COLOR 0
    #endif
    
    // </e>
    
    // </e>
    
    // <e> NFC_PLATFORM_ENABLED - nfc_platform - NFC platform module for Clock control.
    //==========================================================
    #ifndef NFC_PLATFORM_ENABLED
    #define NFC_PLATFORM_ENABLED 1
    #endif
    // <e> NFC_PLATFORM_LOG_ENABLED - Enables logging in the module.
    //==========================================================
    #ifndef NFC_PLATFORM_LOG_ENABLED
    #define NFC_PLATFORM_LOG_ENABLED 0
    #endif
    // <o> NFC_PLATFORM_LOG_LEVEL  - Default Severity level
     
    // <0=> Off 
    // <1=> Error 
    // <2=> Warning 
    // <3=> Info 
    // <4=> Debug 
    
    #ifndef NFC_PLATFORM_LOG_LEVEL
    #define NFC_PLATFORM_LOG_LEVEL 3
    #endif
    
    // <o> NFC_PLATFORM_INFO_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NFC_PLATFORM_INFO_COLOR
    #define NFC_PLATFORM_INFO_COLOR 0
    #endif
    
    // <o> NFC_PLATFORM_DEBUG_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NFC_PLATFORM_DEBUG_COLOR
    #define NFC_PLATFORM_DEBUG_COLOR 0
    #endif
    
    // </e>
    
    // </e>

Reply
  • These are different errors, indicating that you have not included source files for nfc_platform and nrfx_nfct driver. I see you have included nfc_platform.c in your project, also make sure you add the following file:

    modules\nrfx\drivers\src\nrfx_nfct.c

    You also need to add this to your sdk_config.h file to enable the modules:

    // <e> NRFX_NFCT_ENABLED - nrfx_nfct - NFCT peripheral driver
    //==========================================================
    #ifndef NRFX_NFCT_ENABLED
    #define NRFX_NFCT_ENABLED 1
    #endif
    // <o> NRFX_NFCT_CONFIG_IRQ_PRIORITY  - Interrupt priority
     
    // <0=> 0 (highest) 
    // <1=> 1 
    // <2=> 2 
    // <3=> 3 
    // <4=> 4 
    // <5=> 5 
    // <6=> 6 
    // <7=> 7 
    
    #ifndef NRFX_NFCT_CONFIG_IRQ_PRIORITY
    #define NRFX_NFCT_CONFIG_IRQ_PRIORITY 6
    #endif
    
    // <e> NRFX_NFCT_CONFIG_LOG_ENABLED - Enables logging in the module.
    //==========================================================
    #ifndef NRFX_NFCT_CONFIG_LOG_ENABLED
    #define NRFX_NFCT_CONFIG_LOG_ENABLED 0
    #endif
    // <o> NRFX_NFCT_CONFIG_LOG_LEVEL  - Default Severity level
     
    // <0=> Off 
    // <1=> Error 
    // <2=> Warning 
    // <3=> Info 
    // <4=> Debug 
    
    #ifndef NRFX_NFCT_CONFIG_LOG_LEVEL
    #define NRFX_NFCT_CONFIG_LOG_LEVEL 3
    #endif
    
    // <o> NRFX_NFCT_CONFIG_INFO_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_NFCT_CONFIG_INFO_COLOR
    #define NRFX_NFCT_CONFIG_INFO_COLOR 0
    #endif
    
    // <o> NRFX_NFCT_CONFIG_DEBUG_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NRFX_NFCT_CONFIG_DEBUG_COLOR
    #define NRFX_NFCT_CONFIG_DEBUG_COLOR 0
    #endif
    
    // </e>
    
    // </e>
    
    // <e> NFC_PLATFORM_ENABLED - nfc_platform - NFC platform module for Clock control.
    //==========================================================
    #ifndef NFC_PLATFORM_ENABLED
    #define NFC_PLATFORM_ENABLED 1
    #endif
    // <e> NFC_PLATFORM_LOG_ENABLED - Enables logging in the module.
    //==========================================================
    #ifndef NFC_PLATFORM_LOG_ENABLED
    #define NFC_PLATFORM_LOG_ENABLED 0
    #endif
    // <o> NFC_PLATFORM_LOG_LEVEL  - Default Severity level
     
    // <0=> Off 
    // <1=> Error 
    // <2=> Warning 
    // <3=> Info 
    // <4=> Debug 
    
    #ifndef NFC_PLATFORM_LOG_LEVEL
    #define NFC_PLATFORM_LOG_LEVEL 3
    #endif
    
    // <o> NFC_PLATFORM_INFO_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NFC_PLATFORM_INFO_COLOR
    #define NFC_PLATFORM_INFO_COLOR 0
    #endif
    
    // <o> NFC_PLATFORM_DEBUG_COLOR  - ANSI escape code prefix.
     
    // <0=> Default 
    // <1=> Black 
    // <2=> Red 
    // <3=> Green 
    // <4=> Yellow 
    // <5=> Blue 
    // <6=> Magenta 
    // <7=> Cyan 
    // <8=> White 
    
    #ifndef NFC_PLATFORM_DEBUG_COLOR
    #define NFC_PLATFORM_DEBUG_COLOR 0
    #endif
    
    // </e>
    
    // </e>

Children
Related