NFC support in Visual Studio Code. And sdk Support

HI.

I started developing with chip nrf52840 using Visual Studio code.

Unfortunetly i didnt find any examples haw to use NFC paring in VS code.

If i understand corectly VS code can compile only zephyros librataries and can't compile NRF_SDK?
And are there any examples of NFC use in VS code / zephyros ?

Parents Reply Children
  • Hi. thanks for response.
    I tried open this sample(samples/bluetooth/central_nfc_pairing) but there are many errors.

    Im managed to add .h files to cmake. But i getting these errors:

    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:7: warning: attempt to assign the value 'y' to the undefined symbol NCS_SAMPLES_DEFAULTS
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:9: warning: attempt to assign the value 'y' to the undefined symbol DK_LIBRARY
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:11: warning: attempt to assign the value 'y' to the undefined symbol NFC_T4T_NRFXLIB
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:13: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:14: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_MSG
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:15: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_RECORD
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:16: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_LE_OOB_REC
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:17: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_CH_MSG
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:19: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_TNEP_RECORD
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:20: warning: attempt to assign the value 'y' to the undefined symbol NFC_TNEP_TAG
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:21: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_PARSER
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:22: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_CH_PARSER
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:23: warning: attempt to assign the value 'y' to the undefined symbol NFC_NDEF_LE_OOB_REC_PARSER
    c:/ncs/v2.4.2/nrf/samples/bluetooth/peripheral_nfc_pairing/prj.conf:24: warning: attempt to assign the value 'y' to the undefined symbol NFC_TNEP_CH
    error: Aborting due to Kconfig warnings


    What that means and how can i solve that?


    And when i removed those options in proj.conf i getting many errors like this:

    C:\ncs\v2.4.2\nrf\include\nfc\ndef\ch_msg.h:30:35: error: 'CONFIG_NFC_NDEF_CH_MAJOR_VERSION' undeclared (first use in this function)
    30 | #define NFC_NDEF_CH_MSG_MAJOR_VER CONFIG_NFC_NDEF_CH_MAJOR_VERSION
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\ncs\v2.4.2\nrf\include\nfc\ndef\ch.h:197:34: note: in definition of macro 'NFC_NDEF_CH_RECORD_DESC_DEF'
    197 | .major_version = _major_version, \
    | ^~~~~~~~~~~~~~

    Have you any idea what can be the problem?

  • Hi, 

    Please try to update SDK from ToolManager instead of modifying the proj.conf.


    Regards,
    Amanda H.

  • I already updated sdk and toolchain but VS code throwing same errors.

    Have you some other idea?

  • tolomaj said:
    Im managed to add .h files to cmake. But i getting these errors:

    Did you see the error before you modified the project?

    What .h files do you add into cmake?

    Do you also set the correct toolchain version v2.4.2? 

    Are you using VScode or west build for building project?

    For VS code:

    -Amanda H.

  • Before i modified project has no included libraries as nfc/ndef/msg.h so i didnt see that error.

    I added those folders to CMakeLists.txt containing <nfc/___.h> librataries and that solve issue with not included librataries:
      include_directories(C:/ncs/v2.4.2/nrfxlib/nfc/include)
      include_directories(C:/ncs/v2.4.2/nrf/include)

    I think iam using west.

    Can be that the problem ?

    If so how can i switch to VScode?

Related