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

Using app UART in my project

Hi , 

I can compile and use the UART example but when I try to use it in my project I get some linking errors Disappointed

I have copied and past all the sdk_config.h file to my project from UART example, again I get error finally 

I copied evene the main file of the example to my main file but still I get following errors:

.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_get (referred from main.o).

.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_init (referred from main.o).

.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol app_uart_put (referred from main.o).

.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol bsp_board_leds_init (referred from main.o).

Thanks for your quick reply.

Regards,

Mostafa

  • You have probably forgotten to enable the UART library (and maybe the FIFO library) in sdk_config.h. You can do it by adding these lines in sdk_config.h:

    // <q> APP_FIFO_ENABLED  - app_fifo - Software FIFO implementation
     
    
    #ifndef APP_FIFO_ENABLED
    #define APP_FIFO_ENABLED 1
    #endif
    
    // <e> APP_UART_ENABLED - app_uart - UART driver
    //==========================================================
    #ifndef APP_UART_ENABLED
    #define APP_UART_ENABLED 1
    #endif

    You can also look at the the sdk_config.h file in the peripheral/uart example to see how it is done. 

    How to use the SDK configuration header file.

Related