OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Source/] [portable/] [Rowley/] [MSP430F449/] [portext.asm] - Blame information for rev 600

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 572 jeremybenn
/*
2
    FreeRTOS V6.1.1 - Copyright (C) 2011 Real Time Engineers Ltd.
3
 
4
    ***************************************************************************
5
    *                                                                         *
6
    * If you are:                                                             *
7
    *                                                                         *
8
    *    + New to FreeRTOS,                                                   *
9
    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *
10
    *    + Looking for basic training,                                        *
11
    *    + Wanting to improve your FreeRTOS skills and productivity           *
12
    *                                                                         *
13
    * then take a look at the FreeRTOS books - available as PDF or paperback  *
14
    *                                                                         *
15
    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *
16
    *                  http://www.FreeRTOS.org/Documentation                  *
17
    *                                                                         *
18
    * A pdf reference manual is also available.  Both are usually delivered   *
19
    * to your inbox within 20 minutes to two hours when purchased between 8am *
20
    * and 8pm GMT (although please allow up to 24 hours in case of            *
21
    * exceptional circumstances).  Thank you for your support!                *
22
    *                                                                         *
23
    ***************************************************************************
24
 
25
    This file is part of the FreeRTOS distribution.
26
 
27
    FreeRTOS is free software; you can redistribute it and/or modify it under
28
    the terms of the GNU General Public License (version 2) as published by the
29
    Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
30
    ***NOTE*** The exception to the GPL is included to allow you to distribute
31
    a combined work that includes FreeRTOS without being obliged to provide the
32
    source code for proprietary components outside of the FreeRTOS kernel.
33
    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
34
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
35
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
36
    more details. You should have received a copy of the GNU General Public
37
    License and the FreeRTOS license exception along with FreeRTOS; if not it
38
    can be viewed here: http://www.freertos.org/a00114.html and also obtained
39
    by writing to Richard Barry, contact details for whom are available on the
40
    FreeRTOS WEB site.
41
 
42
    1 tab == 4 spaces!
43
 
44
    http://www.FreeRTOS.org - Documentation, latest information, license and
45
    contact details.
46
 
47
    http://www.SafeRTOS.com - A version that is certified for use in safety
48
    critical systems.
49
 
50
    http://www.OpenRTOS.com - Commercial support, development, porting,
51
    licensing and training services.
52
*/
53
 
54
#include "FreeRTOSConfig.h"
55
#include "portasm.h"
56
 
57
 
58
.CODE
59
 
60
/*
61
 * The RTOS tick ISR.
62
 *
63
 * If the cooperative scheduler is in use this simply increments the tick
64
 * count.
65
 *
66
 * If the preemptive scheduler is in use a context switch can also occur.
67
 */
68
_vTickISR:
69
                portSAVE_CONTEXT
70
 
71
                call    #_vTaskIncrementTick
72
 
73
                #if configUSE_PREEMPTION == 1
74
                        call    #_vTaskSwitchContext
75
                #endif
76
 
77
                portRESTORE_CONTEXT
78
/*-----------------------------------------------------------*/
79
 
80
 
81
/*
82
 * Manual context switch called by the portYIELD() macro.
83
 */
84
_vPortYield::
85
 
86
                /* Mimic an interrupt by pushing the SR. */
87
                push    SR
88
 
89
                /* Now the SR is stacked we can disable interrupts. */
90
                dint
91
 
92
                /* Save the context of the current task. */
93
                portSAVE_CONTEXT
94
 
95
                /* Switch to the highest priority task that is ready to run. */
96
                call    #_vTaskSwitchContext
97
 
98
                /* Restore the context of the new task. */
99
                portRESTORE_CONTEXT
100
/*-----------------------------------------------------------*/
101
 
102
 
103
/*
104
 * Start off the scheduler by initialising the RTOS tick timer, then restoring
105
 * the context of the first task.
106
 */
107
_xPortStartScheduler::
108
 
109
                /* Setup the hardware to generate the tick.  Interrupts are disabled
110
                when this function is called. */
111
                call    #_prvSetupTimerInterrupt
112
 
113
                /* Restore the context of the first task that is going to run. */
114
                portRESTORE_CONTEXT
115
/*-----------------------------------------------------------*/
116
 
117
 
118
                /* Place the tick ISR in the correct vector. */
119
                .VECTORS
120
 
121
                .KEEP
122
 
123
                ORG             TIMERA0_VECTOR
124
                DW              _vTickISR
125
 
126
 
127
 
128
                END
129
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.