NEWLIB_LIBC_NANO usage in Asset Tracker v2

Hi,

I am comparing Asset Tracker v2 in SDK v2.2.0 and v.2.1.1

One of the changes is the newlib-nano C library in v2.2.0. CONFIG_NEWLIB_LIBC_NANO is set to "y" in v2.2.0 prj.conf, but VS Code is showing a warning stating "CONFIG_NEWLIB_LIBC_NANO was assigned the value y, but got the value n. Missing dependencies: NET_L2_OPENTHREAD || (NEWLIB_LIBC && HAS_NEWLIB_LIBC_NANO) || (HAS_NEWLIB_LIBC_NANO && NEWLIB_LIBC)". This happens regardless of any Kconfig fragments. How can we use newlib-nano C with Asset Tracker v2? I am using SUPL library with Asset Tracker v2, and the binary file is massive at the moment, to the point that I have to disable logging, AT client, and modem trace libraries to be able to build the code. The premise of a "smaller" binary is very promising if we can get it to work.

Kind Regards,
Iman

Parents
  • Hello Iman, 

    I see what you mean, but sa far as I can see it does build with CONFIG_NEWLIB_LIBC_NANO=y. From \asset_tracker_v2\build\zephyr\.config 

    #
    # C Library
    #
    CONFIG_REQUIRES_FULL_LIBC=y
    CONFIG_SUPPORT_MINIMAL_LIBC=y
    CONFIG_PICOLIBC_SUPPORTED=y
    # CONFIG_PICOLIBC is not set
    CONFIG_NEWLIB_LIBC=y
    # CONFIG_EXTERNAL_LIBC is not set
    CONFIG_HAS_NEWLIB_LIBC_NANO=y
    CONFIG_NEWLIB_LIBC_MIN_REQUIRED_HEAP_SIZE=2048
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
    # CONFIG_NEWLIB_LIBC_FLOAT_SCANF is not set
    # CONFIG_NEWLIB_LIBC_HEAP_LISTENER is not set
    CONFIG_STDOUT_CONSOLE=y
    # end of C Library

    Kind regards,
    Øyvind

  • I am just adding this for the convenience of others that stumble into issues with disabling nano.
    It even builds with CONFIG_NEWLIB_LIBC_NANO=y if you set it to n in SDK v2.2.0.
    You can get around this by manually setting the value in the .config file in the build dir.

Reply Children
No Data
Related