Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problems with nfc_t4t_lib with nRF5 SDK 17

When using nRF5 SDK 17 and its nfc_t4t_lib, we encounted a problem:
nfc_t4t_setup returned NRFX_SUCCESS, instead of NRF_SUCCESS and the nfc_platform_setup function was never called.

We have our own nrfxc_glue.h file, based on the template file. Our NRFX_SUCCESS was therefore 0xBAD0000. This caused nfc_t4t_setup to fail since the lib assumes nrfx_nfct_parameter_set should return 0 (NRF_SUCCESS), not NRFX_SUCCESS. This works fine in the examples since the integration/nrfx/nrfx_glue.h file overrides the NRFX values.

Maybe the template glue file should be updated and components/nfc/t4t_lib/nfc_t4t_lib.h could have a check for it?

While looking for the error I also noticed that the components/nfc/t4t_lib/nfc_t4t_lib_gcc*.a files contains more files than it should:

$ ar t components/nfc/t4t_lib/nfc_t4t_lib_gcc.a
app_util_platform.c.o
isodepmsg.c.o
nfc_t4t_lib.c.o
nfc_t4t_lib_al.c.o
nrf_assert.c.o
nrfx_atomic.c.o

$ ar t components/nfc/t4t_lib/nfc_t4t_lib_gcc_no_fpu.a
app_util_platform.c.o
isodepmsg.c.o
nfc_t4t_lib.c.o
nfc_t4t_lib_al.c.o
nrf_assert.c.o
nrfx_atomic.c.o

The nrf_assert, nrfx_atomic and app_util_platform files shouldn't be there.


For most projects this is not a problem since object files have higher priority than archive files, but we unpack the file and add it in another archive file...

Related