The dsPIC_MPLAB demo project now compiles under MPLAB X v6.20 using xc16 compilers

This commit is contained in:
agarratt 2024-06-20 16:50:23 +02:00
parent 31419bfcee
commit 61df9abef9
2 changed files with 9 additions and 0 deletions

View file

@ -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 <xc.h>
/*
* Include the generic headers required for the FreeRTOS port being used.
*/

View file

@ -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;