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



Posted by https://www.google.com/accounts on October 26, 2009
I was wondering if anyone has any insight as to the reason the portTASK_FUNCTION_PROTO/portTASK_FUNCTION_PROTO macros were not used in the PIC32MX port? It was used in the PIC18 port. I know this is more of a purist question than one of style. My assumption is that the author of the port simply did not feel the macro necessary. I have found that it works and included it in my demo branch (for learning reasons only).




Posted by Richard on October 26, 2009
The macros can be used to add compiler key word extensions to task functions with the aim of reducing their stack usage (basically because they never return). This is generally only useful on really small micros with very limited RAM.

How have you implemented the macros?



Posted by https://www.google.com/accounts on October 27, 2009
Hi Richard,

I can send you the entire project (although I doubt that's what you want), here is a quick summary:

First I modified the function prototypes for the two tasks, to validate the

//dmc static void prvTestTask1( void *pvParameters );
static portTASK_FUNCTION_PROTO(prvTestTask1, prvParameters);
//dmc static void prvTestTask2( void *pvParameters );
static portTASK_FUNCTION_PROTO(prvTestTask2, prvParameters);

And then the function definitions as:
static portTASK_FUNCTION(prvTestTask1, pvParameters)
//static void prvTestTask1( void *pvParameters )

static portTASK_FUNCTION(prvTestTask2, pvParameters)
//static void prvTestTask2( void *pvParameters )

To be comlete, I have not tested the parameters, but don't see any issues...do you?

I am using the demo on the PIC32MX/PIC32MX USB starter kits. I haven't ported the USB driver (in the spirit of the Microchip Application note you mention on your web site) and probably won't. My goal for now is to impliment a variation of the MRF24J40 Radio Utility Driver Program and develop a wireless application for the PIC32 under FreRTOS.



Posted by https://www.google.com/accounts on October 27, 2009
And I should probably mention that the macro definitions (included with the port in the MPLAB PIC32MX portmacro.h file (per the distribution) are:
/* Task function macros as described on the FreeRTOS.org WEB site. */
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__((noreturn)#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )

i.e., no changes from the demo as unziped from FreeRTOS 6.0.0.

BTW, my appologies for the text formatting. Need to learn about the Markdown syntax.


[ 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