This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to add a ncs/nrf library to my project

For example, I'd like to add library at_cmd_parser to my project. (It's under /ncs/nrf/lib/at_cmd_parser.)

My project is out-of-tree in its own directory. I tried in CMakeLists to use: add_subdirectory(), include(), or add_library(). None of these works.

What is the right way to do it? Other than directly copy those C files into my project?

Thanks!

  • Now you mentioned it, I did find such warning about AT_CMD_PARSER. I didn't pay attention to it before. So I added CONFIG_NEWLIB_LIBC=y to prj.conf. That seems to solve the problem. Is this the right solution for it?

    I'm using NCS1.6 and installed manually.

    Also I can't find any doc about CONFIG_AT_CMD_PARSER on Zephyr's web. A search always result in nothing found.

    -------------------------------

    warning: AT_CMD_PARSER (defined at C:/work/ncs/nrf\lib\at_cmd_parser/Kconfig:7) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: (NEWLIB_LIBC ||
    EXTERNAL_LIBC) (=n). See
    docs.zephyrproject.org/.../CONFIG_AT_CMD_PARSER.html and/or look up
    AT_CMD_PARSER in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.

  • Yes, that explains it - the library depends on Newlib.The reason you don't find anything about this kconfig symbol in the Zephyr documentation is that the AT command parser library is part of nrf repository and not Zephyr.

    I see the url given in the warning is wrong, it should have directed you to this page where the nRF symbols are included: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.0/kconfig/index.html 

Related