This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF51 Error: L6218E: Undefined symbol (referred from main.o)

Hello!

I am having these errors when compiling and I have no idea on how to fix them:
\nrf51422_xxac.axf: Error: L6218E: Undefined symbol custom_service_init (referred from main.o).
\nrf51422_xxac.axf: Error: L6218E: Undefined symbol custom_service_update_data (referred from main.o).

I am trying to use bluetooth on nRF51 with an example using a temperature sensor. These are the only parts of the code that I have the functions above:

static void services_init(void)
{
    uint32_t       err_code;
    err_code = custom_service_init();
    APP_ERROR_CHECK(err_code);
}
/**@brief Function for application main entry.
 */
int main(void)
{
    uint32_t err_code;
    uint8_t i=0;
    int8_t temp_c;
    int8_t temp_f;

    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_LOW,
                         err_code);
    APP_ERROR_CHECK(err_code);

    DEBUG_PRINTF("");
    DEBUG_PRINTF("=============");
    DEBUG_PRINTF("Device booted");
    DEBUG_PRINTF("=============");
    ble_stack_init();
    gap_params_init();
    advertising_init();
    services_init();

    // Start execution.
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);

    // Enter main loop.
    while(1)
    {
        nrf_delay_ms(1000);
        temp_c = (int8_t)temperature_data_get() + TEMP_CAL_OFFSET;
        temp_f = (int8_t)((float)temp_c*9/5+32);
        char2_data[0] = temp_c;
        char2_data[1] = temp_f;
        err_code = custom_service_update_data(m_conn_handle,char2_data);
        APP_ERROR_CHECK(err_code);

        DEBUG_PRINTF("Actual temperature: %d C -- %d F", temp_c,temp_f);
    }
}

Thank you in advance for any information on how to make it work!

0