cancel
Showing results for 
Search instead for 
Did you mean: 

Undefine symbol readableU1 (refered from main.o)

KKS
Associate II

.\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.

3 REPLIES 3

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 Up vote any posts that you find helpful, it shows what's working..
T J
Lead
char readableU1(void) {
    U1RxBufferPtrIN =  U1RxBufSize - __HAL_DMA_GET_COUNTER(huart7.hdmarx);   
    return U1RxBufferPtrIN - U1RxBufferPtrOUT;
}

T J
Lead

same code different Cortex syntax

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