MultiNUS Build unsuccessful in NCS v2.6.0

Hello,

While building MultiNUS project with NCS v2.6.0, the following error occurs.

 Building C object CMakeFiles/app.dir/src/main.c.obj
FAILED: CMakeFiles/app.dir/src/main.c.obj 
C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52840_XXAA -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus -IC:/ncs/v2.6.0/nrf/drivers/mpsl/clock_control -IC:/ncs/v2.6.0/zephyr/include -IC:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus/build/multiNus/zephyr/include/generated -IC:/ncs/v2.6.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/v2.6.0/zephyr/soc/common/nordic_nrf/. -IC:/ncs/v2.6.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.6.0/zephyr/subsys/bluetooth -IC:/ncs/v2.6.0/zephyr/subsys/settings/include -IC:/ncs/v2.6.0/nrf/include -IC:/ncs/v2.6.0/nrf/lib/multithreading_lock/. -IC:/ncs/v2.6.0/nrf/subsys/bluetooth/controller/. -IC:/ncs/v2.6.0/zephyr/drivers/flash -IC:/ncs/v2.6.0/nrf/tests/include -IC:/ncs/v2.6.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.6.0/zephyr/modules/cmsis/. -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.6.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.6.0/modules/debug/segger/SEGGER -IC:/ncs/v2.6.0/modules/debug/segger/Config -IC:/ncs/v2.6.0/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.6.0/nrfxlib/mpsl/fem/common/include -IC:/ncs/v2.6.0/nrfxlib/mpsl/fem/nrf21540_gpio/include -IC:/ncs/v2.6.0/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -IC:/ncs/v2.6.0/nrfxlib/mpsl/fem/simple_gpio/include -IC:/ncs/v2.6.0/nrfxlib/mpsl/fem/include -IC:/ncs/v2.6.0/nrfxlib/mpsl/fem/include/protocol -IC:/ncs/v2.6.0/nrfxlib/mpsl/include -IC:/ncs/v2.6.0/nrfxlib/mpsl/include/protocol -IC:/ncs/v2.6.0/nrfxlib/softdevice_controller/include -isystem C:/ncs/v2.6.0/zephyr/lib/libc/common/include -isystem C:/ncs/v2.6.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus/build/multiNus/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.6.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.6.0=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c C:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus/src/main.c
In file included from C:/ncs/v2.6.0/zephyr/include/zephyr/logging/log.h:11,
                 from C:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus/src/main.c:35:
C:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus/src/main.c: In function 'multi_nus_send':
C:/ncs/v2.6.0/nrf/samples/bluetooth/multiNus/src/main.c:159:85: warning: implicit declaration of function 'log_strdup'; did you mean 'strdup'? [-Wimplicit-function-declaration]
  159 |                                         LOG_INF("Sent to server %d: %s", nus_index, log_strdup(message));
      |                                                                                     ^~~~~~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/logging/log_core.h:166:32: note: in definition of macro 'Z_LOG_TO_PRINTK'
  166 |                              ##__VA_ARGS__); \
      |                                ^~~~~~~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/logging/log_core.h:250:9: note: in expansion of macro 'Z_LOG2'
  250 |         Z_LOG2(_level, 0, __log_current_const_data, __log_current_dynamic_data, __VA_ARGS__)
      |         ^~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/logging/log.h:63:24: note: in expansion of macro 'Z_LOG'
   63 | #define LOG_INF(...)   Z_LOG(LOG_LEVEL_INF, __VA_ARGS__)
      |                        ^~~~~

Can you please suggest what we are missing in order to build it successfully

Parents
  • Hello,

    MultiNUS project with NCS v2.6.0

    The MultiNUS example and blog is quite old - over 4 years now - and it is made for the nRF Connect SDK v1.4.1, and so it will need to be upgraded if you would like to use it with nRF Connect SDK v2.6.0.
    The approach I would recommend here is to re-implement the example as detailed in the blogpost in a sample from the v2.6.0 SDK, instead of upgrading the existing v1.4.1 implementation to work with v2.6.0. There will likely be differences in the API calls and names between what is mentioned in the blogpost and example, and the ones available in v2.6.0, but the general outline and approach will still be the same.

    Please do not hesitate to ask if you should encounter any issues or questions when giving this a try. 

    Best regards,
    Karl

Reply
  • Hello,

    MultiNUS project with NCS v2.6.0

    The MultiNUS example and blog is quite old - over 4 years now - and it is made for the nRF Connect SDK v1.4.1, and so it will need to be upgraded if you would like to use it with nRF Connect SDK v2.6.0.
    The approach I would recommend here is to re-implement the example as detailed in the blogpost in a sample from the v2.6.0 SDK, instead of upgrading the existing v1.4.1 implementation to work with v2.6.0. There will likely be differences in the API calls and names between what is mentioned in the blogpost and example, and the ones available in v2.6.0, but the general outline and approach will still be the same.

    Please do not hesitate to ask if you should encounter any issues or questions when giving this a try. 

    Best regards,
    Karl

Children
No Data
Related