2018-09-06 12:28 AM
.\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.
2018-09-06 02:19 AM
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.
2018-09-06 02:47 AM
char readableU1(void) {
U1RxBufferPtrIN = U1RxBufSize - __HAL_DMA_GET_COUNTER(huart7.hdmarx);
return U1RxBufferPtrIN - U1RxBufferPtrOUT;
}
2018-09-06 02:48 AM
same code different Cortex syntax
char readableU1(void) {
U1RxBufferPtrIN = U1RxBufSize - huart2.hdmarx->Instance->CNDTR;
return U1RxBufferPtrIN - U1RxBufferPtrOUT;
}