Modify the GCC/AVR port to make use of the xTaskIncrementTick return value.

Add pre-processor directives in the dsPIC and PIC24 port layers that allows both port files to be included in the same project.
This commit is contained in:
Richard Barry 2013-06-11 20:15:15 +00:00
parent 3aad6381e1
commit 2fd431e971
5 changed files with 33 additions and 20 deletions

View file

@ -157,7 +157,7 @@ unsigned portBASE_TYPE uxCriticalNesting = 0xef;
#endif /* __HAS_EDS__ */
#endif /* MPLAB_PIC24_PORT */
#if defined( __dsPIC30F__ ) || defined ( __dsPIC33E__ ) || defined( __dsPIC33F__ )
#if defined( __dsPIC30F__ ) || defined( __dsPIC33F__ )
#define portRESTORE_CONTEXT() \
asm volatile( "MOV _pxCurrentTCB, W0 \n" /* Restore the stack pointer for the task. */ \

View file

@ -72,6 +72,8 @@
mission critical applications that require provable dependability.
*/
#if defined( __PIC24E__ ) || defined ( __PIC24F__ ) || defined( __PIC24FK__ ) || defined( __PIC24H__ )
.global _vPortYield
.extern _vTaskSwitchContext
.extern uxCriticalNesting
@ -133,3 +135,5 @@ _vPortYield:
return
.end
#endif /* defined( __PIC24E__ ) || defined ( __PIC24F__ ) || defined( __PIC24FK__ ) || defined( __PIC24H__ ) */

View file

@ -56,22 +56,24 @@
***************************************************************************
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, and our new
fully thread aware and reentrant UDP/IP stack.
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems, who sell the code with commercial support,
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
Integrity Systems, who sell the code with commercial support,
indemnification and middleware, under the OpenRTOS brand.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
*/
#if defined( __dsPIC30F__ ) || defined( __dsPIC33F__ )
.global _vPortYield
.extern _vTaskSwitchContext
.extern uxCriticalNesting
@ -103,8 +105,8 @@ _vPortYield:
PUSH DOSTARTH
PUSH DOENDL
PUSH DOENDH
PUSH CORCON
PUSH PSVPAG
MOV _uxCriticalNesting, W0 /* Save the critical nesting counter for the task. */
@ -146,3 +148,6 @@ _vPortYield:
return
.end
#endif /* defined( __dsPIC30F__ ) || defined( __dsPIC33F__ ) */