Update to V4.3.0 as described in http://www.FreeRTOS.org/History.txt

This commit is contained in:
Richard Barry 2007-06-05 09:56:16 +00:00
parent 017740b75a
commit 623aa3675f
110 changed files with 680 additions and 606 deletions

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -184,19 +184,11 @@
typedef void ( __interrupt __far *pxISR )(); typedef void ( __interrupt __far *pxISR )();
#endif #endif
#if __GNUC__ && (__AVR32_UC3A0256__ || \ #ifdef GCC_AVR32_PORT
__AVR32_UC3A0512__ || \
__AVR32_UC3A1128__ || \
__AVR32_UC3A1256__ || \
__AVR32_UC3A1512__)
#include "portmacro.h" #include "portmacro.h"
#endif #endif
#if __ICCAVR32__ && (__AT32UC3A0256__ || \ #ifdef IAR_AVR32_PORT
__AT32UC3A0512__ || \
__AT32UC3A1128__ || \
__AT32UC3A1256__ || \
__AT32UC3A1512__)
#include "portmacro.h" #include "portmacro.h"
#endif #endif

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -43,7 +43,7 @@
* MACROS AND DEFINITIONS * MACROS AND DEFINITIONS
*----------------------------------------------------------*/ *----------------------------------------------------------*/
#define tskKERNEL_VERSION_NUMBER "V4.2.1" #define tskKERNEL_VERSION_NUMBER "V4.3.0"
/** /**
* task. h * task. h

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -13,7 +13,7 @@
*****************************************************************************/ *****************************************************************************/
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -13,7 +13,7 @@
*****************************************************************************/ *****************************************************************************/
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -33,6 +33,12 @@
*************************************************************************** ***************************************************************************
*/ */
/*
Change from V4.2.1:
+ Introduced usage of configKERNEL_INTERRUPT_PRIORITY macro to set the
interrupt priority used by the kernel.
*/
/*----------------------------------------------------------- /*-----------------------------------------------------------
* Implementation of functions defined in portable.h for the ARM CM3 port. * Implementation of functions defined in portable.h for the ARM CM3 port.
@ -52,13 +58,19 @@
#define portNVIC_SYSTICK_INT 0x00000002 #define portNVIC_SYSTICK_INT 0x00000002
#define portNVIC_SYSTICK_ENABLE 0x00000001 #define portNVIC_SYSTICK_ENABLE 0x00000001
#define portNVIC_PENDSVSET 0x10000000 #define portNVIC_PENDSVSET 0x10000000
#define portNVIC_PENDSV_PRI 0x00ff0000 #define portNVIC_PENDSV_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 16 )
#define portNVIC_SVCALL_PRI 0xff000000 #define portNVIC_SYSTICK_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 24 )
#define portNVIC_SYSTICK_PRI 0xff000000
/* Constants required to set up the initial stack. */ /* Constants required to set up the initial stack. */
#define portINITIAL_XPSR ( 0x01000000 ) #define portINITIAL_XPSR ( 0x01000000 )
/* For backward compatibility, ensure configKERNEL_INTERRUPT_PRIORITY is
defined. The value zero should also ensure backward compatibility.
FreeRTOS.org versions prior to V4.3.0 did not include this definition. */
#ifndef configKERNEL_INTERRUPT_PRIORITY
#define configKERNEL_INTERRUPT_PRIORITY 255
#endif
/* Each task maintains its own interrupt status in the critical nesting /* Each task maintains its own interrupt status in the critical nesting
variable. */ variable. */
unsigned portBASE_TYPE uxCriticalNesting = 0xaaaaaaaa; unsigned portBASE_TYPE uxCriticalNesting = 0xaaaaaaaa;
@ -102,7 +114,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
*/ */
portBASE_TYPE xPortStartScheduler( void ) portBASE_TYPE xPortStartScheduler( void )
{ {
/* Make PendSV, CallSV and SysTick the lowest priority interrupts. */ /* Make PendSV and SysTick the lowest priority interrupts. */
*(portNVIC_SYSPRI2) |= portNVIC_PENDSV_PRI; *(portNVIC_SYSPRI2) |= portNVIC_PENDSV_PRI;
*(portNVIC_SYSPRI2) |= portNVIC_SYSTICK_PRI; *(portNVIC_SYSPRI2) |= portNVIC_SYSTICK_PRI;
@ -169,5 +181,21 @@ void prvSetupTimerInterrupt( void )
*(portNVIC_SYSTICK_LOAD) = configCPU_CLOCK_HZ / configTICK_RATE_HZ; *(portNVIC_SYSTICK_LOAD) = configCPU_CLOCK_HZ / configTICK_RATE_HZ;
*(portNVIC_SYSTICK_CTRL) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE; *(portNVIC_SYSTICK_CTRL) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE;
} }
/*-----------------------------------------------------------*/
void vPortSwitchContext( void )
{
vPortSetInterruptMask();
vTaskSwitchContext();
vPortClearInterruptMask();
}
/*-----------------------------------------------------------*/
void vPortIncrementTick( void )
{
vPortSetInterruptMask();
vTaskIncrementTick();
vPortClearInterruptMask();
}

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -32,13 +32,29 @@
with commercial development and support options. with commercial development and support options.
*************************************************************************** ***************************************************************************
*/ */
/*
Change from V4.2.1:
+ Introduced usage of configKERNEL_INTERRUPT_PRIORITY macro to set the
interrupt priority used by the kernel.
*/
#include <FreeRTOSConfig.h> #include <FreeRTOSConfig.h>
/* For backward compatibility, ensure configKERNEL_INTERRUPT_PRIORITY is
defined. The value zero should also ensure backward compatibility.
FreeRTOS.org versions prior to V4.3.0 did not include this definition. */
#ifndef configKERNEL_INTERRUPT_PRIORITY
#define configKERNEL_INTERRUPT_PRIORITY 0
#endif
RSEG ICODE:CODE RSEG ICODE:CODE
EXTERN vPortYieldFromISR EXTERN vPortYieldFromISR
EXTERN vTaskSwitchContext EXTERN vPortSwitchContext
EXTERN vTaskIncrementTick EXTERN vPortIncrementTick
EXTERN uxCriticalNesting EXTERN uxCriticalNesting
EXTERN pxCurrentTCB EXTERN pxCurrentTCB
@ -46,16 +62,20 @@
PUBLIC vSetMSP PUBLIC vSetMSP
PUBLIC xPortPendSVHandler PUBLIC xPortPendSVHandler
PUBLIC xPortSysTickHandler PUBLIC xPortSysTickHandler
PUBLIC vPortSetInterruptMask
PUBLIC vPortClearInterruptMask
vSetPSP: vSetPSP:
msr psp, r0 msr psp, r0
bx lr bx lr
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
vSetMSP vSetMSP
msr msp, r0 msr msp, r0
bx lr bx lr
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
xPortPendSVHandler: xPortPendSVHandler:
@ -73,11 +93,9 @@ xPortPendSVHandler:
ldr r1, [r1] ldr r1, [r1]
str r0, [r1] str r0, [r1]
no_save: no_save:
ldr r0, =vTaskSwitchContext ldr r0, =vPortSwitchContext
push {r14} push {r14}
cpsid i
blx r0 blx r0
cpsie i
pop {r14} pop {r14}
/* Restore the context. */ /* Restore the context. */
@ -96,18 +114,18 @@ no_save:
bx r14 bx r14
sv_disable_interrupts: sv_disable_interrupts:
cpsid i mov r1, #configKERNEL_INTERRUPT_PRIORITY
msr basepri, R1
bx r14 bx r14
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
xPortSysTickHandler: xPortSysTickHandler:
/* Call the scheduler tick function. */ /* Call the scheduler tick function. */
ldr r0, =vTaskIncrementTick ldr r0, =vPortIncrementTick
push {r14} push {r14}
cpsid i
blx r0 blx r0
cpsie i
pop {r14} pop {r14}
/* If using preemption, also force a context switch. */ /* If using preemption, also force a context switch. */
@ -125,8 +143,32 @@ xPortSysTickHandler:
bx r14 bx r14
tick_disable_interrupts: tick_disable_interrupts:
cpsid i mov r1, #configKERNEL_INTERRUPT_PRIORITY
msr basepri, R1
bx r14 bx r14
END
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
vPortSetInterruptMask:
push { r0 }
mov R0, #configKERNEL_INTERRUPT_PRIORITY
msr BASEPRI, R0
pop { R0 }
bx r14
/*-----------------------------------------------------------*/
vPortClearInterruptMask:
PUSH { r0 }
MOV R0, #0
MSR BASEPRI, R0
POP { R0 }
bx r14
/*-----------------------------------------------------------*/
END

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -33,6 +33,13 @@
*************************************************************************** ***************************************************************************
*/ */
/*
Change from V4.2.1:
+ Introduced usage of configKERNEL_INTERRUPT_PRIORITY macro to set the
interrupt priority used by the kernel.
*/
#ifndef PORTMACRO_H #ifndef PORTMACRO_H
#define PORTMACRO_H #define PORTMACRO_H
@ -86,9 +93,11 @@ extern void vPortYieldFromISR( void );
extern void vPortEnableInterrupts( void ); extern void vPortEnableInterrupts( void );
extern void vPortEnterCritical( void ); extern void vPortEnterCritical( void );
extern void vPortExitCritical( void ); extern void vPortExitCritical( void );
extern void vPortSetInterruptMask( void );
extern void vPortClearInterruptMask( void );
#define portDISABLE_INTERRUPTS() __asm ( "cpsid i" ) #define portDISABLE_INTERRUPTS() vPortSetInterruptMask();
#define portENABLE_INTERRUPTS() __asm ( "cpsie i" ) #define portENABLE_INTERRUPTS() vPortClearInterruptMask();
#define portENTER_CRITICAL() vPortEnterCritical() #define portENTER_CRITICAL() vPortEnterCritical()
#define portEXIT_CRITICAL() vPortExitCritical() #define portEXIT_CRITICAL() vPortExitCritical()
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
@ -100,5 +109,6 @@ extern void vPortExitCritical( void );
#define inline #define inline
#define portNOP() #define portNOP()
#endif /* PORTMACRO_H */ #endif /* PORTMACRO_H */

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,4 +1,4 @@
; FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. ; FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
; ;
; This file is part of the FreeRTOS.org distribution. ; This file is part of the FreeRTOS.org distribution.
; ;

View File

@ -13,7 +13,7 @@
*****************************************************************************/ *****************************************************************************/
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -13,7 +13,7 @@
*****************************************************************************/ *****************************************************************************/
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,4 +1,4 @@
; FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. ; FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
; ;
; This file is part of the FreeRTOS.org distribution. ; This file is part of the FreeRTOS.org distribution.
; ;

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,4 +1,4 @@
; FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. ; FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
; ;
; This file is part of the FreeRTOS.org distribution. ; This file is part of the FreeRTOS.org distribution.
; ;

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS distribution. This file is part of the FreeRTOS distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS distribution. This file is part of the FreeRTOS distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS distribution. This file is part of the FreeRTOS distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS distribution. This file is part of the FreeRTOS distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -33,6 +33,12 @@
*************************************************************************** ***************************************************************************
*/ */
/*
Changes from V4.2.1
+ Introduced the configKERNEL_INTERRUPT_PRIORITY definition.
*/
/*----------------------------------------------------------- /*-----------------------------------------------------------
* Implementation of functions defined in portable.h for the PIC24 port. * Implementation of functions defined in portable.h for the PIC24 port.
*----------------------------------------------------------*/ *----------------------------------------------------------*/
@ -46,12 +52,22 @@
#define portTIMER_PRESCALE 8 #define portTIMER_PRESCALE 8
#define portINITIAL_SR 0 #define portINITIAL_SR 0
/* Defined for backward compatability with project created prior to
FreeRTOS.org V4.3.0. */
#ifndef configKERNEL_INTERRUPT_PRIORITY
#define configKERNEL_INTERRUPT_PRIORITY 1
#endif
/* The program counter is only 23 bits. */ /* The program counter is only 23 bits. */
#define portUNUSED_PR_BITS 0x7f #define portUNUSED_PR_BITS 0x7f
/* Records the nesting depth of calls to portENTER_CRITICAL(). */ /* Records the nesting depth of calls to portENTER_CRITICAL(). */
unsigned portBASE_TYPE uxCriticalNesting = 0xef; unsigned portBASE_TYPE uxCriticalNesting = 0xef;
#if configKERNEL_INTERRUPT_PRIORITY != 1
#error If configKERNEL_INTERRUPT_PRIORITY is not 1 then the #32 in the following macros needs changing to equal the portINTERRUPT_BITS value, which is ( configKERNEL_INTERRUPT_PRIORITY << 5 )
#endif
#ifdef MPLAB_PIC24_PORT #ifdef MPLAB_PIC24_PORT
#define portRESTORE_CONTEXT() \ #define portRESTORE_CONTEXT() \
@ -77,7 +93,7 @@ unsigned portBASE_TYPE uxCriticalNesting = 0xef;
#define portSAVE_CONTEXT() \ #define portSAVE_CONTEXT() \
asm volatile( "PUSH SR \n" /* Save the SR used by the task.... */ \ asm volatile( "PUSH SR \n" /* Save the SR used by the task.... */ \
"PUSH W0 \n" /* ....then disable interrupts. */ \ "PUSH W0 \n" /* ....then disable interrupts. */ \
"MOV #224, W0 \n" \ "MOV #32, W0 \n" \
"MOV W0, SR \n" \ "MOV W0, SR \n" \
"PUSH W1 \n" /* Save registers to the stack. */ \ "PUSH W1 \n" /* Save registers to the stack. */ \
"PUSH.D W2 \n" \ "PUSH.D W2 \n" \
@ -134,7 +150,7 @@ unsigned portBASE_TYPE uxCriticalNesting = 0xef;
#define portSAVE_CONTEXT() \ #define portSAVE_CONTEXT() \
asm volatile( "PUSH SR \n" /* Save the SR used by the task.... */ \ asm volatile( "PUSH SR \n" /* Save the SR used by the task.... */ \
"PUSH W0 \n" /* ....then disable interrupts. */ \ "PUSH W0 \n" /* ....then disable interrupts. */ \
"MOV #224, W0 \n" \ "MOV #32, W0 \n" \
"MOV W0, SR \n" \ "MOV W0, SR \n" \
"PUSH W1 \n" /* Save registers to the stack. */ \ "PUSH W1 \n" /* Save registers to the stack. */ \
"PUSH.D W2 \n" \ "PUSH.D W2 \n" \
@ -305,7 +321,7 @@ const unsigned portLONG ulCompareMatch = ( configCPU_CLOCK_HZ / portTIMER_PRESCA
PR1 = ( unsigned portSHORT ) ulCompareMatch; PR1 = ( unsigned portSHORT ) ulCompareMatch;
/* Setup timer 1 interrupt priority. */ /* Setup timer 1 interrupt priority. */
IPC0bits.T1IP = portKERNEL_INTERRUPT_PRIORITY; IPC0bits.T1IP = configKERNEL_INTERRUPT_PRIORITY;
/* Clear the interrupt as a starting condition. */ /* Clear the interrupt as a starting condition. */
IFS0bits.T1IF = 0; IFS0bits.T1IF = 0;
@ -339,7 +355,7 @@ void vPortExitCritical( void )
} }
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
void __attribute__((__interrupt__)) _T1Interrupt( void ) void __attribute__((__interrupt__, auto_psv)) _T1Interrupt( void )
{ {
vTaskIncrementTick(); vTaskIncrementTick();

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -68,11 +68,11 @@
#define portBYTE_ALIGNMENT 2 #define portBYTE_ALIGNMENT 2
#define portSTACK_GROWTH 1 #define portSTACK_GROWTH 1
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
#define portKERNEL_INTERRUPT_PRIORITY 0x01
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
/* Critical section management. */ /* Critical section management. */
#define portINTERRUPT_BITS ( 0x00e0 ) #define portINTERRUPT_BITS ( ( unsigned portSHORT ) configKERNEL_INTERRUPT_PRIORITY << ( unsigned portSHORT ) 5 )
#define portDISABLE_INTERRUPTS() SR |= portINTERRUPT_BITS #define portDISABLE_INTERRUPTS() SR |= portINTERRUPT_BITS
#define portENABLE_INTERRUPTS() SR &= ~portINTERRUPT_BITS #define portENABLE_INTERRUPTS() SR &= ~portINTERRUPT_BITS

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -34,10 +34,6 @@
*/ */
/* /*
Changes from V4.2.1
+ CallReturn Depth increased from 10 to 12 levels to accomodate wizC/fedC V14.
+CodeOptions added to disable the wizC/fedC optimiser within asm
Changes from V3.2.1 Changes from V3.2.1
+ CallReturn Depth increased from 8 to 10 levels to accomodate wizC/fedC V12. + CallReturn Depth increased from 8 to 10 levels to accomodate wizC/fedC V12.
@ -96,7 +92,7 @@ extern volatile tskTCB * volatile pxCurrentTCB;
#define portSTACK_CALLRETURN_ENTRY_SIZE ( 2 ) #define portSTACK_CALLRETURN_ENTRY_SIZE ( 2 )
#endif #endif
#define portSTACK_MINIMAL_CALLRETURN_DEPTH ( 12 ) #define portSTACK_MINIMAL_CALLRETURN_DEPTH ( 10 )
#define portSTACK_OTHER_BYTES ( 20 ) #define portSTACK_OTHER_BYTES ( 20 )
unsigned portSHORT usCalcMinStackSize = 0; unsigned portSHORT usCalcMinStackSize = 0;
@ -125,10 +121,8 @@ unsigned portCHAR ucScratch;
* We do this here already to avoid W-register conflicts. * We do this here already to avoid W-register conflicts.
*/ */
_Pragma("asm") _Pragma("asm")
dupmodoff
movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
movwf PRODL,ACCESS ; PRODL is used as temp register movwf PRODL,ACCESS ; PRODL is used as temp register
dupmodon
_Pragma("asmend") _Pragma("asmend")
ucScratch = PRODL; ucScratch = PRODL;
@ -220,11 +214,9 @@ unsigned portSHORT usPortCALCULATE_MINIMAL_STACK_SIZE( void )
* Fetch the size of compiler's scratchspace. * Fetch the size of compiler's scratchspace.
*/ */
_Pragma("asm") _Pragma("asm")
dupmodoff
movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE movlw OVERHEADPAGE0-LOCOPTSIZE+MAXLOCOPTSIZE
movlb usCalcMinStackSize>>8 movlb usCalcMinStackSize>>8
movwf usCalcMinStackSize,BANKED movwf usCalcMinStackSize,BANKED
dupmodon
_Pragma("asmend") _Pragma("asmend")
/* /*

View File

@ -1,5 +1,5 @@
/* /*
FreeRTOS.org V4.2.1 - Copyright (C) 2003-2007 Richard Barry. FreeRTOS.org V4.3.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution. This file is part of the FreeRTOS.org distribution.
@ -209,7 +209,6 @@ extern unsigned portSHORT usCalcMinStackSize;
portDISABLE_INTERRUPTS(); \ portDISABLE_INTERRUPTS(); \
\ \
_Pragma("asm") \ _Pragma("asm") \
dupmodoff \
; \ ; \
; Push the relevant SFR's onto the task's stack \ ; Push the relevant SFR's onto the task's stack \
; \ ; \
@ -283,7 +282,6 @@ extern unsigned portSHORT usCalcMinStackSize;
movff pxCurrentTCB+1,FSR0H \ movff pxCurrentTCB+1,FSR0H \
movff FSR2L,POSTINC0 \ movff FSR2L,POSTINC0 \
movff FSR2H,POSTINC0 \ movff FSR2H,POSTINC0 \
dupmodon \
_Pragma("asmend") \ _Pragma("asmend") \
} while(0) } while(0)
@ -296,7 +294,6 @@ extern unsigned portSHORT usCalcMinStackSize;
do \ do \
{ \ { \
_Pragma("asm") \ _Pragma("asm") \
dupmodoff \
; \ ; \
; Set FSR0 to point to pxCurrentTCB->pxTopOfStack. \ ; Set FSR0 to point to pxCurrentTCB->pxTopOfStack. \
; \ ; \
@ -396,7 +393,6 @@ extern unsigned portSHORT usCalcMinStackSize;
movff PREINC2,WREG \ movff PREINC2,WREG \
movff PREINC2,STATUS \ movff PREINC2,STATUS \
return 0 ; Return without affecting interrupts \ return 0 ; Return without affecting interrupts \
dupmodon \
_Pragma("asmend") \ _Pragma("asmend") \
} while(0) } while(0)
@ -410,9 +406,7 @@ extern void vPortYield( void );
#define portYIELD() vPortYield() #define portYIELD() vPortYield()
#define portNOP() _Pragma("asm") \ #define portNOP() _Pragma("asm") \
dupmodoff \
nop \ nop \
dupmodon \
_Pragma("asmend") _Pragma("asmend")
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/

Some files were not shown because too many files have changed in this diff Show More