diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h index 4b59512c9..7810b29d4 100644 --- a/include/FreeRTOS.h +++ b/include/FreeRTOS.h @@ -29,6 +29,12 @@ #ifndef INC_FREERTOS_H #define INC_FREERTOS_H +/* + * On Microchip xc16 target there will be undefined reference to _Nop + * xc.h is supplied by Microchip and defines Nop + */ +#include + /* * Include the generic headers required for the FreeRTOS port being used. */ diff --git a/portable/MPLAB/PIC24_dsPIC/portmacro.h b/portable/MPLAB/PIC24_dsPIC/portmacro.h index fbac471d5..9e1e3edf7 100644 --- a/portable/MPLAB/PIC24_dsPIC/portmacro.h +++ b/portable/MPLAB/PIC24_dsPIC/portmacro.h @@ -54,7 +54,10 @@ #define portSTACK_TYPE uint16_t #define portBASE_TYPE short #define portPOINTER_SIZE_TYPE size_t +/* Microchip xc16 compilers already define SIZE_MAX in stdint.h */ +#ifndef SIZE_MAX #define SIZE_MAX ( ( size_t ) -1 ) +#endif typedef portSTACK_TYPE StackType_t; typedef short BaseType_t;