bmarques wrote on Friday, February 05, 2010:
Hello,
I’m using FreeRTOS on a board I made with an AT90USB647 and the compiler issues a warning on line 422 of tasks.c:
FreeRTOS/tasks.c: In function ‘xTaskGenericCreate’:
FreeRTOS/tasks.c:422: error: cast from pointer to integer of different size
FreeRTOS/tasks.c:422: error: cast to pointer from integer of different size
in line 422 of tasks.c i can see:
_pxTopOfStack = ( portSTACK_TYPE * ) ( ( ( unsigned long ) pxTopOfStack ) & ( ( unsigned long ) ~portBYTE_ALIGNMENT_MASK ) );
_
in portmacro.h (based on portmacro.h in the ATMega323 example) i have:
#define portSTACK_TYPE unsigned portCHAR
is this the correct portSTACK_TYPE for the AVR uController?
What should i do? change portSTACK_TYPE or change line 422 of tasks.c?
If i replace ‘long’ by ‘int’ in line 422 the warning disapears and FreeRTOS works but is this correct?
Regards,
Bernardo Marques.