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).
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.
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.
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.