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.
@ -19,26 +19,42 @@
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
Also see http://www.SafeRTOS.com for an IEC 61508 compliant version along
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>
/* 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
EXTERN vPortYieldFromISR
EXTERN vTaskSwitchContext
EXTERN vTaskIncrementTick
EXTERN vPortSwitchContext
EXTERN vPortIncrementTick
EXTERN uxCriticalNesting
EXTERN pxCurrentTCB
@ -46,16 +62,20 @@
PUBLIC vSetMSP
PUBLIC xPortPendSVHandler
PUBLIC xPortSysTickHandler
PUBLIC vPortSetInterruptMask
PUBLIC vPortClearInterruptMask
vSetPSP:
msr psp, r0
bx lr
/*-----------------------------------------------------------*/
vSetMSP
msr msp, r0
bx lr
/*-----------------------------------------------------------*/
xPortPendSVHandler:
@ -73,11 +93,9 @@ xPortPendSVHandler:
ldr r1, [r1]
str r0, [r1]
no_save:
ldr r0, =vTaskSwitchContext
ldr r0, =vPortSwitchContext
push {r14}
cpsid i
blx r0
cpsie i
pop {r14}
/* Restore the context. */
@ -96,37 +114,61 @@ no_save:
bx r14
sv_disable_interrupts:
cpsid i
mov r1, #configKERNEL_INTERRUPT_PRIORITY
msr basepri, R1
bx r14
/*-----------------------------------------------------------*/
xPortSysTickHandler:
/* Call the scheduler tick function. */
ldr r0, =vTaskIncrementTick
ldr r0, =vPortIncrementTick
push {r14}
cpsid i
blx r0
cpsie i
pop {r14}
pop {r14}
/* If using preemption, also force a context switch. */
#if configUSE_PREEMPTION == 1
push {r14}
ldr r0, =vPortYieldFromISR
blx r0
pop {r14}
pop {r14}
#endif
/* Exit with interrupts in the correct state. */
ldr r2, =uxCriticalNesting
ldr r2, [r2]
cbnz r2, tick_disable_interrupts
bx r14
tick_disable_interrupts:
cpsid i
bx r14
END
tick_disable_interrupts:
mov r1, #configKERNEL_INTERRUPT_PRIORITY
msr basepri, R1
bx r14
/*-----------------------------------------------------------*/
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