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

Coap_client sample don't compile for nrf9160

Hi

I'm using nRF Connect SDK v1.5.1 and Segger IDE. Starting from fresh with Clean Build Directory, the sample won't compile with Segger IDE (build solution).

Building ‘cmake_object_order_depends_target_mbedcrypto_shared’ from solution ‘build’ in configuration ‘Common’
Building ‘C:/NordicSDK/v1.5.1/zephyr/misc/empty_file.c’ from solution ‘build’ in configuration ‘Common’
Building ‘cmake_object_order_depends_target_mbedcrypto_oberon_noglue’ from solution ‘build’ in configuration ‘Common’
Building ‘modules/nrfxlib/nrf_security/src/mbedtls/oberon/libmbedcrypto_oberon_noglue.a’ from solution ‘build’ in configuration ‘Common’
Compiling ‘empty_file.c’
Compiling ‘aes.c’
Compiling ..........

.........

Compiling ‘radio.c’
'CONFIG_NET_CONFIG_IEEE802154_DEV_NAME' undeclared (first use in this function)
each undeclared identifier is reported only once for each function it appears in
Compiling ‘settings.c’
Compiling ‘spi.c’
Compiling ‘shell.c’
Compiling ‘logging.c’
Build failed

I aware of a similar case: https://devzone.nordicsemi.com/f/nordic-q-a/70747/can-t-compile-the-coap_client-example-for-the-nrf9160, but can't understand the solution.

Btw: The sample seems to compile if using west: west build -b nrf9160dk_nrf9160ns --pristine  But I haven't been able to test the functionality yet.

  • Hi,

    There are two coap_client samples, one in the nrf/samples/openthread folder, and another in the nrf/samples/nrf9160 folder. There is a bug causing the /openthread sample to be built when the /nrf9160 sample is selected from the dropdown menu in SES.

    To get around this you can click the "..." button next to the dropdown menu then navigate to and select nrf/samples/nrf9160/coap_client, or use the command line like you have already done.

Related