Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


PIC32 demos won't build in MPLAB-X

Posted by Felix Hirzel on October 5, 2012
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,


from ../../../Source/portable/MPLAB/PIC32MX/port.c:72:


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!

RE: PIC32 demos won't build in MPLAB-X

Posted by Richard on October 5, 2012
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.


RE: PIC32 demos won't build in MPLAB-X

Posted by Felix Hirzel on October 5, 2012
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...

RE: PIC32 demos won't build in MPLAB-X

Posted by Richard on October 6, 2012
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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists