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

Using nrfxlib in cmake project.

Hi,

I was try to import modul nrfxlib in extising cmake project. My IDE is Eclipse CDT. Version of Zephyr is 2.4.0. Reason to do that, was testing SoftDevice BLE functionality.

I was import library as ZEPHYR_MODULE and select SoftDevice with CONFIG_BT_LL_SOFTDEVICE_DEFAULT=y. While compile everything is Ok. But linker does not found "bt_rand", and "bt_encrypt_le" functions.

What must be also enabled this this functions will be compiled?

If I disable CONFIG_BT_LL_SOFTDEVICE_DEFAULT everything is Ok.

Thanks in advance.

Parents Reply Children
  • Hi,

    I'm using cmake for build system. And as I know NCS use west in front of cmake. West is not compatible with Eclipse CDT.

    I could try to do, but I'm prepare with your help to import nrfxlib into clasic Zephyr project. I think most of users will like that.

    I can send you prj.conf file and CMakeList.txt file.

    I'm also discover that CONFIG_NORDIC_SECURITY_BACKEND must be enabled. But then MbedTLS module must be included. And here is another problem. Nrfxlib could not find mbedtls modul. It will be nice and more transparent that Zephyr moduls is used for nrfxlib.

    Best regards,

    Robert 

  • Hello Robert,

    NCS uses the same build system as Zephyr, so it should really be no different. It's optional to use west as the build command.

    robertfirma said:
    It will be nice and more transparent that Zephyr moduls is used for nrfxlib.

     Yes, but then you won't be able to utitilize the cc310 for HW accelerated crypto on the nRF52840.

  • Hi,

    Do you have any link to NCS sample app that using only cmake (not west) to build app?

    I mean, that CMakeList.txt file include which ZEPHYR_MODULES is in project and not west build.

    Why we could not use cc31X HW in Zephyr apps?

    Best regards,

    Robert

  • Hi,

    NCS uses the same build system as Zephyr, so all of our samples come with a CMakelist.txt file. Whether you use West or cmake commands to build projects is up to you.

    In case you want to use west West, note that the "west build" does allow you to specify additional Cmake arguments. See "Generate and Import an Eclipse Project" for how you can use these to generate Eclipse projects.

    robertfirma said:
    Why we could not use cc31X HW in Zephyr apps?

    You could, but to do so, you would need to integrate mbedtls with the propriatery cc310 backend as we have done it in NCS. And please keep in mind that NCS doesn't prevent you from selecting the SW based crypto libraries from Zephyr, it's merely giving your more options to choose from.

    Best regards,

    Vidar

Related