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

Adding libraries to BLE_app_blinky "error"

Hi all,

I am trying the port the peripheral UART example to the BLE_app_blinky and adding the respective libraries that are missing in the BLE app.

after I included the libraries I have 4 scenarios:

1.5)

compiling system_nrf52.c...
compiling softdevice_handler.c...
linking...
.\_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).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 3 error messages.
".\_build\nrf52832_xxaa.axf" - 3 Error(s), 0 Warning(s).
  1. I was able to compile but at first I got a fatal error coming from the nRF52 (I have the nRF52 connected via Termite)

  2. I got 5 errors and I am unable to compile:

    ._build\nrf52832_xxaa.axf: Error: L6200E: Symbol app_uart_get multiply defined (by app_uart_fifo.o and app_uart.o). ._build\nrf52832_xxaa.axf: Error: L6200E: Symbol app_uart_init multiply defined (by app_uart_fifo.o and app_uart.o). ._build\nrf52832_xxaa.axf: Error: L6200E: Symbol app_uart_put multiply defined (by app_uart_fifo.o and app_uart.o). ._build\nrf52832_xxaa.axf: Error: L6200E: Symbol app_uart_close multiply defined (by app_uart_fifo.o and app_uart.o). ._build\nrf52832_xxaa.axf: Error: L6200E: Symbol app_uart_flush multiply defined (by app_uart_fifo.o and app_uart.o). Not enough information to list image symbols. Not enough information to list the image map.

  3. If I remove the PATH for fifo library:

    compiling app_fifo.c... compiling app_uart_fifo.c... ............\components\libraries\uart\app_uart_fifo.c(15): error: #5: cannot open source input file "app_fifo.h": No such file or directory #include "app_fifo.h" ............\components\libraries\uart\app_uart_fifo.c: 0 warnings, 1 error compiling app_uart.c...

I am following steps at post "Stefan Birnir Sverrisson" devzone.nordicsemi.com/.../

I am using: nRF52 DK Softdevice $132 ble_app_blinky

Thanks

Parents
  • Seems to be working fine here.

    1. Add app_fifo.c, app_uart_fifo.c and retarget.c to the project
    2. Include components\libraries\fifo and components\libraries\uart
    3. Set APP_UART_ENABLED 1, and add and set APP_FIFO_ENABLED 1, RETARGET_ENABLED 1

    Add the following to main.c:

    #include "app_uart.h"
    #define UART_TX_BUF_SIZE 256                         /**< UART TX buffer size. */
    #define UART_RX_BUF_SIZE 256                         /**< UART RX buffer size. */
    
    void uart_error_handle(app_uart_evt_t * p_event)
    {
        if (p_event->evt_type == APP_UART_COMMUNICATION_ERROR)
        {
            APP_ERROR_HANDLER(p_event->data.error_communication);
        }
        else if (p_event->evt_type == APP_UART_FIFO_ERROR)
        {
            APP_ERROR_HANDLER(p_event->data.error_code);
        }
    }
    
    static void uart_init()
    {
        uint32_t err_code;
        
        const app_uart_comm_params_t comm_params =
        {
          RX_PIN_NUMBER,
          TX_PIN_NUMBER,
          RTS_PIN_NUMBER,
          CTS_PIN_NUMBER,
          APP_UART_FLOW_CONTROL_ENABLED,
          false,
          UART_BAUDRATE_BAUDRATE_Baud115200
        };
    
        APP_UART_FIFO_INIT(&comm_params,
                             UART_RX_BUF_SIZE,
                             UART_TX_BUF_SIZE,
                             uart_error_handle,
                             APP_IRQ_PRIORITY_LOWEST,
                             err_code);
    
        APP_ERROR_CHECK(err_code);
        
    }
    

    And in main(), something like:

    uart_init();
    
    printf("\r\nBlinky Uart \r\n");
    

    Here is my project, try it out.

  • @Petter Myhre Yes i have included app_uart.h now the problem is gone! thank you..:) I still can't use printf stattements even if i enabled RETARGET_ENABLED!

Reply Children
No Data
Related