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

OpenThread CLI sample in nrfConnect SDK 3.1 fails while linking.

I tried to build the OpenThread CLI sample in nrfConnect SDK 3.1 with the version of Segger as installed by the ToolChain Manager. 4.52 on a nRF52840 DK board.

This is the location of the sample: ncs\v1.3.0\nrf\samples\openthread\cli

I opened the SDK project via the CMakeLists.txt file as explained in the docs. Compiling goes OK, but linking gives a whole list of errors (see part of the build output below).. It starts with a missing otThreadGetDeviceRole

I am running this on Win10. Some other non-openthread samples like Blinky work fine but the OpenThread Coap sample has the same problem.

Anyone else has the same problem (and a solution)?

Thanks

Hugo

[....]

  Compiling ‘timer.c’
  Compiling ‘poll.c’
  Archiving ‘libkernel.a’
Building ‘zephyr/zephyr_prebuilt.elf’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘empty_file.c’
  Linking ‘zephyr_prebuilt.elf’
    B         1 MB     10.66%
    B       256 KB     20.19%
    zephyr/subsys/net/l2/openthread/libsubsys__net__ip__l2__openthread.a(openthread.c.obj): in function `ot_state_changed_handler':
    undefined reference to `otThreadGetDeviceRole'
    zephyr/subsys/net/l2/openthread/libsubsys__net__ip__l2__openthread.a(openthread.c.obj): in function `ot_receive_handler':
    undefined reference to `otMessageGetLength'
    f:/nordic_semi/ncs/v1.3.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: F:/nordic_semi/ncs/v1.3.0/zephyr/subsys/net/l2/openthread/openthread.c:190: undefined reference to `otMessageRead'

[....]

Related