FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2009 Threads] portTASK_FUNCTION_PROTO macro and PIC32MXPosted 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).
Thanks,
Dave
RE: portTASK_FUNCTION_PROTO macro and PIC32MXPosted 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?
Regards.
RE: portTASK_FUNCTION_PROTO macro and PIC32MXPosted 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 changes:
//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 ) { ... }
and 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.
Dave
RE: portTASK_FUNCTION_PROTO macro and PIC32MXPosted 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.
Dave
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|