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

use uart in thread cli example

Hello,

Is any option in thread_cli_ftd_uart example to disable CLI module and use UART for my own purposes ??

I comment  thread_cli_init() function add defines to sdk_config.h add include paths in project settings, add files: nrf_drv_uart.c, nrfx_uart.c, nrfc_uarte.c, app_uart_fifo.c, according to uart example from  nRF5_SDK_for_Thread_and_Zigbee_v4.1.0. and i get linking error:

../../../../../../../../external/openthread/lib/nrf52840/gcc/libopenthread-nrf52840-transport.a(uart.c.o): in function `UARTE0_UART0_IRQHandler':multiple definition of `UARTE0_UART0_IRQHandler'; Output/Release/Obj/thread_cli_ftd_uart_pca10056/nrfx_prs.o:C:\rep\nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8\modules\nrfx\drivers\src\prs/nrfx_prs.c:81: first defined here

Best regards,
Mark

  • Hello Mark,

    The UART is used int the openthread library. If you want to use it for your own purpose you need to rebuild the openthread library without the UART. 

    Check out the section "Building the latest OpenThread libraries" on infocenter. You should use the same release tag that was used to build the openthread libraries in the SDK if you want to be sure that it is compatible with the SDK examples. The release tag is listed in the file:

    SDK\external\openthread\project\readme.txt. 

    Alternatively, you can use the other UART instance on the nRF52840, UART1. 

    BR,

    Edvin

Related