FreeRTOS V3.0 PIC18 port withe mcc18

Hi everybody, I’m new at Freertos and I wanted to try it. I’m using mplab and a custom board with an PIC18f452. My first compile with mcc18 fails with the following error : Executing: "I:mcc18binmcc18.exe" -p=18F452 "tasks.c" -fo="tasks.o" /i"I:mcc18h" /i"M:FreeRTOSdemocommoninclude" /i"M:FreeRTOSsourceinclude" /i"M:FreeRTOSsourceportablemplabPIC18F" /i"M:FreeRTOSdemoPIC18_MPLAB" -w3 -DMPLAB_PIC18F_PORT -Ls -Opa- M:FreeRTOSSourcetasks.c:176:Fatal [100] -internal- unhandled opcode in constant expression Error executing I:mcc18binmcc18-traditional [error=1] Halting build on first failure as requested. The source line concerned in tasks.c is as follows : static volatile xListpxReadyTasksLists[configMAX_PRIORITIES];    /*< Prioratised ready tasks. */ If someone has already faced the same problem or any idea please help. thanks in advance.

FreeRTOS V3.0 PIC18 port withe mcc18

Does the code compile exactly as downloaded (without modification). If you get the same problem with the unmodified code then this could be an MPLAB C problem.  I have found the following extract from a MPLAB bug list: "(20361) the ‘sizeof’ operator when used to specify an array size may   cause an internal error:      char buf[sizeof("hello world")];       Fatal [100]-internal – unhandled opcode in constant expression    The workaround is to use a different method of specifying the array size    constant:      #define STRING_LEN 11      char buf[STRING_LEN + 1]; " The sizeof operator is not explicitly used to define configMAX_PRIORITIES but may be used implicitly because of the cast. configMAX_PRIORITIES is defined in FreeRTOSDemoPIC18_MPLABFreeRTOSConfig.h.  Try removing the cast in the constant definition so it reads: #define configMAX_PRIORITIES       4 Which version of the compiler and IDE are you using? Regards.