PIC32 demos won’t build in MPLAB-X
I am sure it must be something simple but I can’t get the PIC32 demo project to build. Having done a clean install of all the up-to-date Microchip tools, i.e. MPLAB-X and XC-32 compiler, then downloaded the latest version of FreeRTOS, this is the first error I get:
../../../Source/portable/MPLAB/PIC32MX/port.c:72:22: fatal error: FreeRTOS.h: No such file or directory
Adding the path to FreeRTOS.h fixes that and then produces:
C:/Users/xxx/MPLABXProjects/FreeRTOSV7.2.0/FreeRTOS/Source/include/FreeRTOS.h:80:28: fatal error: FreeRTOSConfig.h: No such file or directory
Adding the path to FreeRTOSConfig.h than produces:
In file included from C:/Users/xxx/MPLABXProjects/FreeRTOSV7.2.0/FreeRTOS/Source/include/FreeRTOS.h:83:0,
and
from ../../../Source/portable/MPLAB/PIC32MX/port.c:72:
and
C:/Users/xxx/MPLABXProjects/FreeRTOSV7.2.0/FreeRTOS/Source/include/portable.h:320:25: fatal error: portmacro.h: No such file or directory
Please educate me!
PIC32 demos won’t build in MPLAB-X
Many people have reported that the include paths are being deleted in the project. I haven’t worked out how/why/when this happens yet, but suspect it is something to do with different tool versions or tool installation directories.
The easiest way to add them back in is as manual command line options. To do this, bring up the project properties dialogue box, then go to Configuration->XC32 (Global Options)->XC32-GCC category. You will see a “Additional Options text box on the right side. In this box add the following text:
-I ../../../Source/include -I ../../../Source/portable/MPLAB/PIC32MX -I ../../Common/include -I ../
Do the same for the XC32-as options.
Let me know what happens.
Regards.
PIC32 demos won’t build in MPLAB-X
Just tried that and it worked! It now compiles without errors. Many thanks!
Next question is how hard will it be to get the demo to work on a Microstick II with a PIC32MX250F128B? Is there anything else required besides reconfiguring the project for a different target and development board? Will just have to try it…
PIC32 demos won’t build in MPLAB-X
The FreeRTOS port itself will run on any PIC32. I think there are configurations in the MPLAB project you are using for three different chips already, but not the one you are specifically wanting to use. Like you say, you will have to re-target for the specific chip by doing things like changing the linker script to match the chip, ensuring configTOTAL_HEAP_SIZE fits in the RAM available, etc.
Regards.