Update to V4.5.0 files and directory structure.

This commit is contained in:
Richard Barry 2007-09-17 10:07:48 +00:00
parent 1362bebfdc
commit 98a9959a44
758 changed files with 53177 additions and 3139 deletions

View file

@ -1,5 +1,5 @@
/*
FreeRTOS.org V4.4.0 - Copyright (C) 2003-2007 Richard Barry.
FreeRTOS.org V4.5.0 - Copyright (C) 2003-2007 Richard Barry.
This file is part of the FreeRTOS.org distribution.
@ -42,8 +42,8 @@
#include <FreeRTOSConfig.h>
/* For backward compatibility, ensure configKERNEL_INTERRUPT_PRIORITY is
defined. The value zero should also ensure backward compatibility.
/* 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
@ -79,60 +79,53 @@ vSetMSP
/*-----------------------------------------------------------*/
xPortPendSVHandler:
mrs r0, psp
cbz r0, no_save
/* Save the context into the TCB. */
sub r0, r0, #0x20
stm r0, {r4-r11}
nop
sub r0, r0, #0x04
mrs r0, psp
cbz r0, no_save
/* Save the context into the TCB. */
stmdb r0!, {r4-r11}
sub r0, r0, #0x04
ldr r1, =uxCriticalNesting
ldr r1, [r1]
str R1, [r0, #0x00]
ldr r1, =pxCurrentTCB
ldr r1, [r1]
str r0, [r1]
ldr r2, =pxCurrentTCB
ldr r1, [r1]
ldr r2, [r2]
str r1, [r0]
str r0, [r2]
no_save:
ldr r0, =vPortSwitchContext
push {r14}
blx r0
pop {r14}
/* Restore the context. */
push {r14}
bl vPortSwitchContext
pop {r14}
/* Restore the context. */
ldr r1, =pxCurrentTCB
ldr r1, [r1]
ldr r0, [r1]
ldm r0, {r1, r4-r11}
nop
ldr r1, [r1]
ldr r0, [r1]
ldmia r0!, {r1, r4-r11}
ldr r2, =uxCriticalNesting
str r1, [r2]
add r0, r0, #0x24
msr psp, r0
orr r14, r14, #0xd
/* Exit with interrupts in the state required by the task. */
cbnz r1, sv_disable_interrupts
bx r14
sv_disable_interrupts:
str r1, [r2]
msr psp, r0
orr r14, r14, #0xd
/* Exit with interrupts in the state required by the task. */
cbnz r1, sv_disable_interrupts
bx r14
sv_disable_interrupts:
mov r1, #configKERNEL_INTERRUPT_PRIORITY
msr basepri, R1
bx r14
bx r14
/*-----------------------------------------------------------*/
xPortSysTickHandler:
/* Call the scheduler tick function. */
ldr r0, =vPortIncrementTick
push {r14}
blx r0
bl vPortIncrementTick
pop {r14}
/* If using preemption, also force a context switch. */
#if configUSE_PREEMPTION == 1
push {r14}
ldr r0, =vPortYieldFromISR
blx r0
bl vPortYieldFromISR
pop {r14}
#endif