Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/home/work/external/nrf/subsys/nfc/lib/platform.c: In function 'nfc_platform_tagheaders_get':
/home/work/external/nrf/subsys/nfc/lib/platform.c:143:9: error: unknown type name 'FICR_NFC_Type'; did you mean 'NRF_FICR_NFC_Type'?
143 | FICR_NFC_Type ficr_nfc_ns;
| ^~~~~~~~~~~~~
| NRF_FICR_NFC_Type
/home/work/external/nrf/subsys/nfc/lib/platform.c:144:15: error: unknown type name 'FICR_NFC_Type'
144 | __IOM FICR_NFC_Type *ficr_nfc = &NRF_FICR_S->NFC;
| ^~~~~~~~~~~~~
/home/work/external/nrf/subsys/nfc/lib/platform.c:144:42: error: 'NRF_FICR_S' undeclared (first use in this function); did you mean 'NRF_SICR_S'?
144 | __IOM FICR_NFC_Type *ficr_nfc = &NRF_FICR_S->NFC;
| ^~~~~~~~~~
| NRF_SICR_S
/home/work/external/nrf/subsys/nfc/lib/platform.c:144:42: note: each undeclared identifier is reported only once for each function it appears in
/home/work/external/nrf/subsys/nfc/lib/platform.c:154:36: error: request for member 'TAGHEADER0' in something not a structure or union
154 | tag_header[0] = ficr_nfc_ns.TAGHEADER0;
| ^
/home/work/external/nrf/subsys/nfc/lib/platform.c:155:36: error: request for member 'TAGHEADER1' in something not a structure or union
155 | tag_header[1] = ficr_nfc_ns.TAGHEADER1;
| ^
/home/work/external/nrf/subsys/nfc/lib/platform.c:156:36: error: request for member 'TAGHEADER2' in something not a structure or union
156 | tag_header[2] = ficr_nfc_ns.TAGHEADER2;
Hello -
Above is an error message I am encountering when attempting to use the NFC record_text sample code for a nRF54L15DK in TF-M as the Secure Environment.
The samples do not use TF-M, and so they compile fine, hitting this code in the library:
Fullscreen
1
2
3
4
5
6
7
#else
tag_header[0] = nrf_ficr_nfc_tagheader_get(NRF_FICR, 0);
tag_header[1] = nrf_ficr_nfc_tagheader_get(NRF_FICR, 1);
tag_header[2] = nrf_ficr_nfc_tagheader_get(NRF_FICR, 2);
#endif /* CONFIG_TRUSTED_EXECUTION_NONSECURE */
However, with TF-M, I get the build errors shown at the top of my post, caused by this block of code:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static nrfx_err_t nfc_platform_tagheaders_get(uint32_t tag_header[3])
{
#ifdef CONFIG_TRUSTED_EXECUTION_NONSECURE
#if defined(CONFIG_BUILD_WITH_TFM)
uint32_t err = 0;
enum tfm_platform_err_t plt_err;
FICR_NFC_Type ficr_nfc_ns;
__IOM FICR_NFC_Type *ficr_nfc = &NRF_FICR_S->NFC;
plt_err = tfm_platform_mem_read(&ficr_nfc_ns, (uint32_t)ficr_nfc,
sizeof(ficr_nfc_ns), &err);
if (plt_err != TFM_PLATFORM_ERR_SUCCESS || err != 0) {
LOG_ERR("Could not read FICR NFC Tag Header (plt_err %d, err: %d)",
plt_err, err);
return NRFX_ERROR_INTERNAL;
}
tag_header[0] = ficr_nfc_ns.TAGHEADER0;
tag_header[1] = ficr_nfc_ns.TAGHEADER1;
tag_header[2] = ficr_nfc_ns.TAGHEADER2;
I am looking for a bit of guidance on how I can properly configure my nRF54L15DK project to be able to use Nordic's Zephyr NFC library code while still using CONFIG_BUILD_WITH_TFM.
Thank you!