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

Launch app through NFC Tag scanning in custom application!!!

Hello,

I am working on nRF52832 SDK 15.3.0 using segger embedded studio in windows 7.

I am trying to merge two application, one is launch application through NFC and other is template code given in SDK .

1)launch application path: ..\..\examples\nfc\record_launch_app\pca10040\blank\ses

2)template path:..\..\examples\ble_peripheral\ble_app_template\pca10040\s132\ses

In this i got error as shown below,

Generating linker script ‘ble_app_template_pca10040_s132.ld’
Linking ble_app_template_pca10040_s132.elf
../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib_al.c.o): in function nrfx_nfct_evt_handler':
undefined reference tonrfx_nfct_rx'
C:\build\HP-NFCL74-JOB1\private\nfc_t2t_lib\armgcc/../nfc_t2t_lib_al.c:302: undefined reference to nrfx_nfct_rx'
../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib_al.c.o): in functionnrf_nfct_rx_frameend_handle':
undefined reference to nrfx_nfct_init_substate_force'
C:\build\HP-NFCL74-JOB1\private\nfc_t2t_lib\armgcc/../nfc_t2t_lib_al.c:271: undefined reference tonrfx_nfct_init_substate_force'
../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib_al.c.o): in function nfc_t2t_lib_al_setup':
undefined reference tonrfx_nfct_nfcid1_default_bytes_get'
C:\build\HP-NFCL74-JOB1\private\nfc_t2t_lib\armgcc/../nfc_t2t_lib_al.c:126: undefined reference to nrfx_nfct_init'
../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib_al.c.o): in functionnfc_t2t_lib_al_start':
undefined reference to nrfx_nfct_enable'
../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib_al.c.o): in functionnfc_t2t_lib_al_send':
undefined reference to nrfx_nfct_tx'
Output/ble_app_template_pca10040_s132 Release/Obj/nfc_platform.o: in functionclock_event_handler':
undefined reference to `nrfx_nfct_state_force'
Build failed

 Regards,

Urvisha Andani

  • Hello,

    It is probably because in your template project, which I then assume that you started with, hasn't defined NRFX_NFCT_ENABLED as 1 in sdk_config.h, like it is in the record_launch_app example.

    The function nrfx_nfct_state_force() is defined in nrfx_nfct.c. Make sure that this file is included in your project. In addition, you can see on line 43 in this file, there is an:

    #if NRFX_CHECK(NRFX_NFCT_ENABLED).

    It is just a macro saying:

    #if NRFX_NFCT_ENABLED

    If NRFX_NFCT_ENABLED is defined to 0, then this will be excluded for the compiler. Everything between line 43 and 905:

    #endif // NRFX_CHECK(NRFX_NFCT_ENABLED) will be excluded.

    So define NRFX_NFCT_ENABLED to 1 in sdk_config. If that define is missing, just copy it from the redord_launch_app example's sdk_config.h file.

  • #if NRFX_NFCT_ENABLED

    If NRFX_NFCT_ENABLED is defined to 0, then this will be excluded for the compiler. Everything between line 43 and 905:

    #endif // NRFX_CHECK(NRFX_NFCT_ENABLED) will be excluded.

    So define NRFX_NFCT_ENABLED to 1 in sdk_config. If that define is missing, just copy it from the redord_launch_app example's sdk_config.h file.

    I made changes as per your suggestion but still I am getting error as shown below,

    'NRFX_TIMER4_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TIMER_INSTANCE'?

     

    Regards,

    Urvisha Andani

  • Is the nrfx_nfct.c file included in your project?

  • Is the nrfx_nfct.c file included in your project?

    Thank you for reply.

    Yes I added this file but now I am getting below error,


    Generating linker script ‘ble_app_template_pca10040_s132.ld’
    Linking ble_app_template_pca10040_s132.elf
    ../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib.c.o) uses VFP register arguments, Output/Debug/Exe/ble_app_template_pca10040_s132.elf does not
    failed to merge target specific data of file ../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib.c.o)
    ../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib_al.c.o) uses VFP register arguments, Output/Debug/Exe/ble_app_template_pca10040_s132.elf does not
    failed to merge target specific data of file ../../../../../../components/nfc/t2t_lib/nfc_t2t_lib_gcc.a(nfc_t2t_lib_al.c.o)
    Build failed

    Please give me solution.

  • Have you changed anything in the nfc's header files? try to unzip a new SDK, and copy the NFC files from that one to the one you are working on. 

Related