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


Create a FreeRTOS from scratch (For MicroChip chips, MPLab IDE)

Posted by eaoiyrioeaf on March 28, 2017

In some case, modifying the example port to your own port might difficult, because it is difficulty to modify all the settings. I'm sharing my procedure to create a project from zero, hope it can help some one. Below are the procedure: 1> Create an empty project by the MPLab wizard, and choose the correct chip model. 2> Create main source file, main.c. 3> Copy the "Hardware" folder & "Source" folder & "FreeRTOSConfig.h" to the project folder, Add the folders to source folder, ProjectProperties-->XC16-->XC16-gcc-->Preprocessing and messages-->C include dirs, then include the "FreeRTOS.h", "task.h" and "queue.h", this time the compiler should build with no error. 4> Disable COROUTINES the in file "FreeRTOSConfig.h" by set the Micro configUSECOROUTINES to 0. 5> Create a new logic folder under the Source file, rename the folder to "FreeRTOS Source", and add heap4.c, list.c, port.c, portasmdsPIC.S, queue.c, tasks.c into this logic folder. 6> Define a empty function void vApplicationIdleHook( void ) in the main.c file. By now, the project should build with no error. 7> Define Micro for the port "MPLABDSPICPORT" ProjectProperties-->XC16-->XC16-gcc-->Preprocessing and messages-->Define C macros. Try to build the project again, if some include error appeared, modify the path to help compiler find the file. In my case, the compiler says "deprecateddefinitions.h:106:64: fatal error: ../../Source/portable/MPLAB/PIC24dsPIC/portmacro.h: No such file or directory". I just change the include statement from #include "../../Source/portable/MPLAB/PIC24dsPIC/portmacro.h" to #include "portmacro.h" then the build pass. 8> At last, we might need to uncheck the Use legacy libc option, Project_Properties-->XC16(Global Options)-->Use legacy libc. according to the help document this option:"Check to use libraries in the format before v3.25. Uncheck to use the new (HI-TECH) libraries format."

Create a FreeRTOS from scratch (For MicroChip chips, MPLab IDE)

Posted by rtel on March 28, 2017

Thanks for these MPLAB specific details. They augment the 'generic' pages: http://www.freertos.org/Creating-a-new-FreeRTOS-project.html http://www.freertos.org/porting-a-freertos-demo-to-different-hardware.html

[ 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