vyperin13 wrote on Wednesday, June 06, 2007:
Hello,
I have started a project, using a PIC18F452 & MPLAB 7.52 & MPLAB C18 3.11 Student Edition.
During some of my tests with FreeRTOS, I came to the conclusion that I should use vTaskSuspendAll() / xTaskResumeAll() instead of taskENTER_CRITICAL() / taskEXIT_CRITICAL().
Normally I assume that I need the following to be enabled:
#define INCLUDE_vTaskSuspend 1
in my FreeRtosConfig header file.
But, enabling this, gives me a compile time error: Error [1131] type mismatch in assignment,
the offender being: void vTaskCleanUpResources( void ) , (I also defined INCLUDE_vTaskCleanUpResources)
at the statement type: listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &( pxReadyTasksLists[ usQueue ] ) ); ,
which calls the following define in list.h (i am using the heap_2.c allocator):
#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList )
( pxList )->pxIndex = ( pxList )->pxIndex->pxNext;
if( ( pxList )->pxIndex == ( xListItem * ) &( ( pxList )->xListEnd ) )
{
( pxList )->pxIndex = ( pxList )->pxIndex->pxNext;
}
pxTCB = ( pxList )->pxIndex->pvOwner
I have tried to figure it out, but I must admit, the inlining and data structures simply dazzle me. It is way beyond my programming skills.
So can you help me ? Maby a hint, or what structure may be mismatching: pxList or pxTCB. Maby some added paranthesis, or some explicit cast ?
Hope this can be done. I am just starting to like the RTOS and I really want to use it in my project.
Thank you in advance.
Best Regards,
V.