Particle Xenon NFC

Posted on
  • Hi All,

    I am trying to build Espruino for Particle Xenon board with NFC. I have created a board file similar to NRF52840DK.py but changed the "devices" section in board file according to the Xenon board pinouts for leds and buttons.
    I have tried SDK12 and SDK 15 target by adding NRF_SDK flag in make command but getting error

  • SDK12

    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk' undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: each undeclared identifier is reported only once for each function it appears in
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CC /mnt/f/Users/ABHINAV.000/Documents/esp/E­spruino/targetlibs/nrf5x_15/components/l­ibraries/usbd/app_usbd_core.o
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:130:41: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk'­ undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
                                             NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk  | \
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:130:41: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
                                             NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk  | \
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c: In function 'hal_nfc_send':
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:742:12: warning: passing argument 1 of 'memcpy' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
         memcpy(m_nfc_buffer, p_data, NFC_BUFFER_SIZE);
                ^~~~~~~~~~~~
    In file included from targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.h:56,
                     from targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:44:
    /usr/local/gcc-arm-none-eabi-8-2018-q4-m­ajor/arm-none-eabi/include/string.h:31:9­: note: expected 'void * restrict' but argument is of type 'volatile uint8_t *' {aka 'volatile unsigned char *'}
     void *  memcpy (void *__restrict, const void *__restrict, size_t);
             ^~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c: In function 'NFCT_IRQHandler':
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:874:17: error: 'm_nfc_rx_buffer' undeclared (first use in this function); did you mean 'm_nfc_buffer'?
                 if (m_nfc_rx_buffer[0] == T2T_READ_CMD)
                     ^~~~~~~~~~~~~~~
                     m_nfc_buffer
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:874:39: error: 'T2T_READ_CMD' undeclared (first use in this function)
                 if (m_nfc_rx_buffer[0] == T2T_READ_CMD)
                                           ^~~~~~~~~~~~
    <command-line>: warning: ISO C99 requires whitespace after the macro name
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk' undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CC /mnt/f/Users/ABHINAV.000/Documents/esp/E­spruino/targetlibs/nrf5x_15/components/l­ibraries/usbd/app_usbd_string_desc.o
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:130:41: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk'­ undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
                                             NFCT_ERRORST
    
  • SDK15

    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk' undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: each undeclared identifier is reported only once for each function it appears in
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CC /mnt/f/Users/ABHINAV.000/Documents/esp/E­spruino/targetlibs/nrf5x_15/components/l­ibraries/usbd/app_usbd_core.o
    <command-line>: warning: ISO C99 requires whitespace after the macro name
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:130:41: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk'­ undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
                                             NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk  | \
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:130:41: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
                                             NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk  | \
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c: In function 'hal_nfc_send':
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:742:12: warning: passing argument 1 of 'memcpy' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
         memcpy(m_nfc_buffer, p_data, NFC_BUFFER_SIZE);
                ^~~~~~~~~~~~
    In file included from targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.h:56,
                     from targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:44:
    /usr/local/gcc-arm-none-eabi-8-2018-q4-m­ajor/arm-none-eabi/include/string.h:31:9­: note: expected 'void * restrict' but argument is of type 'volatile uint8_t *' {aka 'volatile unsigned char *'}
     void *  memcpy (void *__restrict, const void *__restrict, size_t);
             ^~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c: In function 'NFCT_IRQHandler':
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:874:17: error: 'm_nfc_rx_buffer' undeclared (first use in this function); did you mean 'm_nfc_buffer'?
                 if (m_nfc_rx_buffer[0] == T2T_READ_CMD)
                     ^~~~~~~~~~~~~~~
                     m_nfc_buffer
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:874:39: error: 'T2T_READ_CMD' undeclared (first use in this function)
                 if (m_nfc_rx_buffer[0] == T2T_READ_CMD)
                                           ^~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk' undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:129:42: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
         [#define](http://forum.espruino.com/sear­ch/?q=%23define) NRF_NFCT_ERRORSTATUS_ALL    (NFCT_ERRORSTATUS_NFCFIELDTOOWEAK_Msk   | \
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CC /mnt/f/Users/ABHINAV.000/Documents/esp/E­spruino/targetlibs/nrf5x_15/components/l­ibraries/usbd/app_usbd_string_desc.o
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:130:41: error: 'NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk'­ undeclared (first use in this function); did you mean 'NFCT_ERRORSTATUS_FRAMEDELAYTIMEOUT_Msk'­?
                                             NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk  | \
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    targetlibs/nrf5x_15/components/nfc/t2t_l­ib/hal_t2t/hal_nfc_t2t.c:130:41: note: in definition of macro 'NRF_NFCT_ERRORSTATUS_ALL'
                                             NFCT_ERRORSTATUS_NFCFIELDTOOSTRONG_Msk  | \
                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    make: *** [Makefile:789: /mnt/f/Users/ABHINAV.000/Documents/esp/E­spruino/targetlibs/nrf5x_15/components/n­fc/t2t_lib/hal_t2t/hal_nfc_t2t.o] Error 1
    make: *** Waiting for unfinished jobs....
    <command-line>: warning: ISO C99 requires whitespace after the macro name
    

    1 Attachment

  • Not sure what I am missing or Espruino support is not available for nrf52840 NFC

  • I'm afraid NFC support isn't available on SDK15. Basically there are some patches for it, but they don't apply cleanly. You'd need to basically apply the changes that were there for SDK12 and apply them to SDK15

  • ... either that or you might be able to ifdef some of the more advanced NFC functionality and just keep the URL setting. If you do get it building, I'd really appreciate a PR though :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Particle Xenon NFC

Posted by Avatar for Abhigkar @Abhigkar

Actions