Skip to main content
KKS
Associate II
September 6, 2018
Question

Undefine symbol readableU1 (refered from main.o)

  • September 6, 2018
  • 3 replies
  • 677 views

.\sx1272mb2das\NUCLEO_CUBE_LORA.axf: Error: L6218E: Undefined symbol readableU1 (referred from main.o).

This error occurs.

char readableU1(void);

void check_GPSBufferSize(void) {

 int currentBufferLength = readableU1();

 if (currentBufferLength > 0) {

 printf("Have GPS Buffer Length %d \n", currentBufferLength);

 }

}

Please help.

    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    September 6, 2018

    Linker is complaining there is no body code for the function you have prototyped. Add that code from wherever you lifted the rest of the example from.​

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    T J
    Senior III
    September 6, 2018
    char readableU1(void) {
     U1RxBufferPtrIN = U1RxBufSize - __HAL_DMA_GET_COUNTER(huart7.hdmarx); 
     return U1RxBufferPtrIN - U1RxBufferPtrOUT;
    }

    T J
    Senior III
    September 6, 2018

    same code different Cortex syntax

    char readableU1(void) {
     U1RxBufferPtrIN = U1RxBufSize - huart2.hdmarx->Instance->CNDTR;
     return U1RxBufferPtrIN - U1RxBufferPtrOUT;
    }