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

Undefined symbol problem (app_uart_get)

I'm sorry for this easy question. I'm just starting to develop an application using a nrf52832.

I want to use uart functions, so I added a line #include "app_uart.h". But when I build the source, it failed saying "._build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_get (referred from main.o)."

What should I do?

Parents
  • Hi,

    You also need to configure the sdk_config.h file.

    You will need to have these defines:

    #define APP_UART_ENABLED 1
    #define APP_FIFO_ENABLED 1
    #define APP_UART_DRIVER_INSTANCE 0
    

    If you want to use printf(), you also need #define RETARGET_ENABLED 1

    If you use Keil, I recommend to use the "Configuration Wizard"

    image description

    You can enter the wizard at the bottom of the editor when you have sdk_config.h open. You can than quickly edit the sdk_config.h using this GUI wizard:

    image description

Reply
  • Hi,

    You also need to configure the sdk_config.h file.

    You will need to have these defines:

    #define APP_UART_ENABLED 1
    #define APP_FIFO_ENABLED 1
    #define APP_UART_DRIVER_INSTANCE 0
    

    If you want to use printf(), you also need #define RETARGET_ENABLED 1

    If you use Keil, I recommend to use the "Configuration Wizard"

    image description

    You can enter the wizard at the bottom of the editor when you have sdk_config.h open. You can than quickly edit the sdk_config.h using this GUI wizard:

    image description

Children
No Data
Related