Imported upstream version 1.20
[fw/openalt] / FreeRTOS / include / portable.h
1 /*
2         FreeRTOS.org V4.4.0 - Copyright (C) 2003-2007 Richard Barry.
3
4         This file is part of the FreeRTOS.org distribution.
5
6         FreeRTOS.org is free software; you can redistribute it and/or modify
7         it under the terms of the GNU General Public License as published by
8         the Free Software Foundation; either version 2 of the License, or
9         (at your option) any later version.
10
11         FreeRTOS.org is distributed in the hope that it will be useful,
12         but WITHOUT ANY WARRANTY; without even the implied warranty of
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14         GNU General Public License for more details.
15
16         You should have received a copy of the GNU General Public License
17         along with FreeRTOS.org; if not, write to the Free Software
18         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
20         A special exception to the GPL can be applied should you wish to distribute
21         a combined work that includes FreeRTOS.org, without being obliged to provide
22         the source code for any proprietary components.  See the licensing section
23         of http:www.FreeRTOS.org for full details of how and when the exception
24         can be applied.
25
26         ***************************************************************************
27         See http:www.FreeRTOS.org for documentation, latest information, license
28         and contact details.  Please ensure to read the configuration and relevant
29         port sections of the online documentation.
30
31         Also see http://www.SafeRTOS.com for an IEC 61508 compliant version along
32         with commercial development and support options.
33         ***************************************************************************
34 */
35
36 /*-----------------------------------------------------------
37  * Portable layer API.  Each function must be defined for each port.
38  *----------------------------------------------------------*/
39
40 #ifndef PORTABLE_H
41 #define PORTABLE_H
42
43 /* Include the macro file relevant to the port being used. */
44
45 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
46         #include "..\..\source\portable\owatcom\16bitdos\pc\portmacro.h"
47         typedef void ( __interrupt __far *pxISR )();
48 #endif
49
50 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
51         #include "..\..\source\portable\owatcom\16bitdos\flsh186\portmacro.h"
52         typedef void ( __interrupt __far *pxISR )();
53 #endif
54
55 #ifdef GCC_MEGA_AVR
56         #include "../portable/GCC/ATMega323/portmacro.h"
57 #endif
58
59 #ifdef IAR_MEGA_AVR
60         #include "../portable/IAR/ATMega323/portmacro.h"
61 #endif
62
63 #ifdef MPLAB_PIC24_PORT
64         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
65 #endif
66
67 #ifdef MPLAB_DSPIC_PORT
68         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
69 #endif
70
71 #ifdef MPLAB_PIC18F_PORT
72         #include "..\..\source\portable\MPLAB\PIC18F\portmacro.h"
73 #endif
74
75 #ifdef _FEDPICC
76         #include "libFreeRTOS/Include/portmacro.h"
77 #endif
78
79 #ifdef SDCC_CYGNAL
80         #include "../../Source/portable/SDCC/Cygnal/portmacro.h"
81 #endif
82
83 #ifdef GCC_ARM7
84         #include "FreeRTOS/portable/GCC/ARM7_LPC2000/portmacro.h"
85 #endif
86
87 #ifdef GCC_ARM7_ECLIPSE
88         #include "portmacro.h"
89 #endif
90
91 #ifdef ROWLEY_LPC23xx
92         #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
93 #endif
94
95 #ifdef GCC_MSP430
96         #include "../../Source/portable/GCC/MSP430F449/portmacro.h"
97 #endif
98
99 #ifdef ROWLEY_MSP430
100         #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
101 #endif
102
103 #ifdef KEIL_ARM7
104         #include "..\..\Source\portable\Keil\ARM7\portmacro.h"
105 #endif
106
107 #ifdef SAM7_GCC
108         #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
109 #endif
110
111 #ifdef SAM7_IAR
112         #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
113 #endif
114
115 #ifdef LPC2000_IAR
116         #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
117 #endif
118
119 #ifdef STR71X_IAR
120         #include "..\..\Source\portable\IAR\STR71x\portmacro.h"
121 #endif
122
123 #ifdef STR75X_IAR
124         #include "..\..\Source\portable\IAR\STR75x\portmacro.h"
125 #endif
126         
127 #ifdef STR75X_GCC
128         #include "..\..\Source\portable\GCC\STR75x\portmacro.h"
129 #endif
130
131 #ifdef STR91X_IAR
132         #include "..\..\Source\portable\IAR\STR91x\portmacro.h"
133 #endif
134         
135 #ifdef GCC_H8S
136         #include "../../Source/portable/GCC/H8S2329/portmacro.h"
137 #endif
138
139 #ifdef GCC_AT91FR40008
140         #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
141 #endif
142
143 #ifdef RVDS_ARMCM3_LM3S102
144         #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
145 #endif
146
147 #ifdef GCC_ARMCM3_LM3S102
148         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
149 #endif
150
151 #ifdef IAR_ARM_CM3
152         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
153 #endif
154
155 #ifdef IAR_ARMCM3_LM
156         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
157 #endif
158         
159 #ifdef HCS12_CODE_WARRIOR
160         #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
161 #endif  
162
163 #ifdef MICROBLAZE_GCC
164         #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
165 #endif
166
167 #ifdef TERN_EE
168         #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
169 #endif
170
171 #ifdef GCC_HCS12
172         #include "../../Source/portable/GCC/HCS12/portmacro.h"
173 #endif
174
175 #ifdef GCC_MCF5235
176     #include "../../Source/portable/GCC/MCF5235/portmacro.h"
177 #endif
178
179 #ifdef BCC_INDUSTRIAL_PC_PORT
180         /* A short file name has to be used in place of the normal
181         FreeRTOSConfig.h when using the Borland compiler. */
182         #include "frconfig.h"
183         #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"
184     typedef void ( __interrupt __far *pxISR )();
185 #endif
186
187 #ifdef BCC_FLASH_LITE_186_PORT
188         /* A short file name has to be used in place of the normal
189         FreeRTOSConfig.h when using the Borland compiler. */
190         #include "frconfig.h"
191         #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
192     typedef void ( __interrupt __far *pxISR )();
193 #endif
194
195 #ifdef __GNUC__
196    #ifdef __AVR32_AVR32A__
197            #include "portmacro.h"
198    #endif
199 #endif
200
201 #ifdef __ICCAVR32__
202    #ifdef __CORE__
203       #if __CORE__ == __AVR32A__
204               #include "portmacro.h"
205       #endif
206    #endif
207 #endif
208
209 /*
210  * Setup the stack of a new task so it is ready to be placed under the
211  * scheduler control.  The registers have to be placed on the stack in
212  * the order that the port expects to find them.
213  */
214 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );
215
216 /*
217  * Map to the memory management routines required for the port.
218  */
219 void vPortUsedMem(int *bytesFree, int *bytesUsed, int *blocksFree);
220 void *pvPortMalloc( size_t xSize );
221 void vPortFree( void *pv );
222 void vPortInitialiseBlocks( void );
223
224 /*
225  * Setup the hardware ready for the scheduler to take control.  This generally
226  * sets up a tick interrupt and sets timers for the correct tick frequency.
227  */
228 portBASE_TYPE xPortStartScheduler( void );
229
230 /*
231  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so
232  * the hardware is left in its original condition after the scheduler stops
233  * executing.
234  */
235 void vPortEndScheduler( void );
236
237
238 #endif /* PORTABLE_H */
239