Hi, my first few days with freeRTOS I have been using the MikroC latest release ARM compiler and all was well,,, until I created tasks to handle UART interrupt.
My code based on examples:-
// Serial interrupt
void UART
Rx() iv IVTINT
USART1 ics ICSAUTO
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
xSemaphoreGiveFromISR( xBinarySemaphore, &xHigherPriorityTaskWoken );
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
// and sends reads byte and send to display task
void UART
RXTask( void *pvParameters )
{
while (1)
{
if (xSemaphoreTake(xBinarySemaphore, portMAX_DELAY) == pdPASS)
{
msgBuffer.msgData[0] = UART1_Read(); // read the received data;
msgBuffer.msgType = MSG_UARTA;
//UART1_Write(rxmsgBuffer.msgData[0]); // Used for testing interrupt
xQueueSend(displayQueueHandle, &msgBuffer, 0xFFFFFFFFU); // Post Byte to Display task
}
}
}
I get the following error after compile :-
0 360 Unresolved extern ‘vPortValidateInterruptPriority’ queue.c
I have searched and this snippet of port.c file (please ignore the quote before the hash) :-
‘#if (configASSERT
DEFINED == 1)
// Limitations in the MikroC inline asm means ulCurrentInterrupt has to be
// global – which makes vPortValidateInterruptPriority() non re-entrant.
// However that should not matter as an interrupt can only itself be
// interrupted by a higher priority interrupt. That means if
// ulCurrentInterrupt, so ulCurrentInterrupt getting corrupted cannot lead
// to an invalid interrupt priority being missed.
void vPortValidateInterruptPriority( void )
{
uint32t ulCurrentInterrupt;
uint8_t ucCurrentPriority;
config_ASSERT is defined in freeRTOS.h, is this a possible bug or do I need to change interrupt priorities ?
as I have read in some of the docs.
Any assistance would be great.
Thanks
Paul