pcat271264 wrote on Tuesday, June 13, 2017:
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 IVT_INT_USART1 ics ICS_AUTO
{
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
xSemaphoreGiveFromISR( xBinarySemaphore, &xHigherPriorityTaskWoken );
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
// and sends reads byte and send to display task
void UART_RX_Task( 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 )
{
uint32_t 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