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

undefined reference to `nrf_cli_uart_transport_api'

Hello support

I have modified the cli examples and run into "undefined reference to `nrf_cli_uart_transport_api'" linker error. 

The error message is

Compiling file: nrf_ble_qwr.c
Compiling file: utf.c
Compiling file: ble_lbs.c
Compiling file: nrf_sdh.c
Compiling file: nrf_sdh_ble.c
Compiling file: nrf_sdh_soc.c
Linking target: _build/nrf52832_xxaa.out
/.../gnuarmemb/gcc-arm-none-eabi-8-2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: _build/nrf52832_xxaa/main.c.o:(.rodata.m_cli_uart_transport+0x0): undefined reference to `nrf_cli_uart_transport_api'
collect2: error: ld returned 1 exit status
make: *** [_build/nrf52832_xxaa.out] Error 1
The terminal process "zsh '-c', 'make'" terminated with exit code: 2.

Terminal will be reused by tasks, press any key to close it.

I am using visual studio code with GCC compiler.

Can you help?  Much appreciated.

  • Hi there,

    I did more testing with the Nordic's recommended IDE (Segger Embedded Studio) and SDK nRF5_SDK_17.0.2_d674dde.  I found similar issue with the " `nrf_cli_uart_transport_api'".

    Here is how to reproduce this issue.

    1. UsenRF5_SDK_17.0.2_d674dde and Segger Embedded Studio v5.6
    2. Open cli examples
        a. sdk_root\examples\peripheral\cli  or
        b. sdk_root\examples\peripheral\cliuarte
    3. Build the solution. 

    The error message is copied below

    Compiling ‘nrf_log_frontend.c’

    nrf_log_frontend.c
    unknown type name 'nrf_cli_transport_api_t'
    unknown type name 'nrf_cli_transport_handler_t'
    unknown type name 'nrf_cli_transport_t'

    Thanks

  • I was able to resolved this issue.  The reason is there is an inadvertent edit in my local copy of the NRF5 SDK that is creating this issue.  After deleting and then re-download the SDK, the examples compiles correctly.

Related