]> git.sur5r.net Git - freertos/blob - Source/include/portable.h
Add 78KR definition.
[freertos] / Source / include / portable.h
1 /*\r
2         FreeRTOS.org V5.1.1 - Copyright (C) 2003-2008 Richard Barry.\r
3 \r
4         This file is part of the FreeRTOS.org distribution.\r
5 \r
6         FreeRTOS.org is free software; you can redistribute it and/or modify\r
7         it under the terms of the GNU General Public License as published by\r
8         the Free Software Foundation; either version 2 of the License, or\r
9         (at your option) any later version.\r
10 \r
11         FreeRTOS.org is distributed in the hope that it will be useful,\r
12         but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14         GNU General Public License for more details.\r
15 \r
16         You should have received a copy of the GNU General Public License\r
17         along with FreeRTOS.org; if not, write to the Free Software\r
18         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
19 \r
20         A special exception to the GPL can be applied should you wish to distribute\r
21         a combined work that includes FreeRTOS.org, without being obliged to provide\r
22         the source code for any proprietary components.  See the licensing section\r
23         of http:www.FreeRTOS.org for full details of how and when the exception\r
24         can be applied.\r
25 \r
26     ***************************************************************************\r
27     ***************************************************************************\r
28     *                                                                         *\r
29     * SAVE TIME AND MONEY!  We can port FreeRTOS.org to your own hardware,    *\r
30     * and even write all or part of your application on your behalf.          *\r
31     * See http://www.OpenRTOS.com for details of the services we provide to   *\r
32     * expedite your project.                                                  *\r
33     *                                                                         *\r
34     ***************************************************************************\r
35     ***************************************************************************\r
36 \r
37         Please ensure to read the configuration and relevant port sections of the\r
38         online documentation.\r
39 \r
40         http://www.FreeRTOS.org - Documentation, latest information, license and\r
41         contact details.\r
42 \r
43         http://www.SafeRTOS.com - A version that is certified for use in safety\r
44         critical systems.\r
45 \r
46         http://www.OpenRTOS.com - Commercial support, development, porting,\r
47         licensing and training services.\r
48 */\r
49 \r
50 /*-----------------------------------------------------------\r
51  * Portable layer API.  Each function must be defined for each port.\r
52  *----------------------------------------------------------*/\r
53 \r
54 #ifndef PORTABLE_H\r
55 #define PORTABLE_H\r
56 \r
57 /* Include the macro file relevant to the port being used. */\r
58 \r
59 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
60         #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"\r
61         typedef void ( __interrupt __far *pxISR )();\r
62 #endif\r
63 \r
64 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT\r
65         #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"\r
66         typedef void ( __interrupt __far *pxISR )();\r
67 #endif\r
68 \r
69 #ifdef GCC_MEGA_AVR\r
70         #include "../portable/GCC/ATMega323/portmacro.h"\r
71 #endif\r
72 \r
73 #ifdef IAR_MEGA_AVR\r
74         #include "../portable/IAR/ATMega323/portmacro.h"\r
75 #endif\r
76 \r
77 #ifdef MPLAB_PIC24_PORT\r
78         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
79 #endif\r
80 \r
81 #ifdef MPLAB_DSPIC_PORT\r
82         #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
83 #endif\r
84 \r
85 #ifdef MPLAB_PIC18F_PORT\r
86         #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"\r
87 #endif\r
88 \r
89 #ifdef MPLAB_PIC32MX_PORT\r
90         #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"\r
91 #endif\r
92 \r
93 #ifdef _FEDPICC\r
94         #include "libFreeRTOS/Include/portmacro.h"\r
95 #endif\r
96 \r
97 #ifdef SDCC_CYGNAL\r
98         #include "../../Source/portable/SDCC/Cygnal/portmacro.h"\r
99 #endif\r
100 \r
101 #ifdef GCC_ARM7\r
102         #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"\r
103 #endif\r
104 \r
105 #ifdef GCC_ARM7_ECLIPSE\r
106         #include "portmacro.h"\r
107 #endif\r
108 \r
109 #ifdef ROWLEY_LPC23xx\r
110         #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"\r
111 #endif\r
112 \r
113 #ifdef IAR_MSP430\r
114         #include "..\..\Source\portable\IAR\MSP430\portmacro.h" \r
115 #endif\r
116         \r
117 #ifdef GCC_MSP430\r
118         #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
119 #endif\r
120 \r
121 #ifdef ROWLEY_MSP430\r
122         #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
123 #endif\r
124 \r
125 #ifdef ARM7_LPC21xx_KEIL_RVDS\r
126         #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"\r
127 #endif\r
128 \r
129 #ifdef SAM7_GCC\r
130         #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
131 #endif\r
132 \r
133 #ifdef SAM7_IAR\r
134         #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
135 #endif\r
136 \r
137 #ifdef SAM9XE_IAR\r
138         #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"\r
139 #endif\r
140 \r
141 #ifdef LPC2000_IAR\r
142         #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
143 #endif\r
144 \r
145 #ifdef STR71X_IAR\r
146         #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
147 #endif\r
148 \r
149 #ifdef STR75X_IAR\r
150         #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
151 #endif\r
152         \r
153 #ifdef STR75X_GCC\r
154         #include "..\..\Source\portable\GCC\STR75x\portmacro.h"\r
155 #endif\r
156 \r
157 #ifdef STR91X_IAR\r
158         #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
159 #endif\r
160         \r
161 #ifdef GCC_H8S\r
162         #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
163 #endif\r
164 \r
165 #ifdef GCC_AT91FR40008\r
166         #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
167 #endif\r
168 \r
169 #ifdef RVDS_ARMCM3_LM3S102\r
170         #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
171 #endif\r
172 \r
173 #ifdef GCC_ARMCM3_LM3S102\r
174         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
175 #endif\r
176 \r
177 #ifdef GCC_ARMCM3\r
178         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
179 #endif\r
180 \r
181 #ifdef IAR_ARM_CM3\r
182         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
183 #endif\r
184 \r
185 #ifdef IAR_ARMCM3_LM\r
186         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
187 #endif\r
188         \r
189 #ifdef HCS12_CODE_WARRIOR\r
190         #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
191 #endif  \r
192 \r
193 #ifdef MICROBLAZE_GCC\r
194         #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
195 #endif\r
196 \r
197 #ifdef TERN_EE\r
198         #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
199 #endif\r
200 \r
201 #ifdef GCC_HCS12\r
202         #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
203 #endif\r
204 \r
205 #ifdef GCC_MCF5235\r
206     #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
207 #endif\r
208 \r
209 #ifdef COLDFIRE_V2_GCC\r
210         #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"\r
211 #endif\r
212 \r
213 #ifdef COLDFIRE_V2_CODEWARRIOR\r
214         #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"\r
215 #endif\r
216 \r
217 #ifdef GCC_PPC405\r
218         #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"\r
219 #endif\r
220 \r
221 #ifdef _16FX_SOFTUNE\r
222         #include "..\..\Source\portable\Softune\MB96340\portmacro.h"\r
223 #endif\r
224 \r
225 #ifdef BCC_INDUSTRIAL_PC_PORT\r
226         /* A short file name has to be used in place of the normal\r
227         FreeRTOSConfig.h when using the Borland compiler. */\r
228         #include "frconfig.h"\r
229         #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
230     typedef void ( __interrupt __far *pxISR )();\r
231 #endif\r
232 \r
233 #ifdef BCC_FLASH_LITE_186_PORT\r
234         /* A short file name has to be used in place of the normal\r
235         FreeRTOSConfig.h when using the Borland compiler. */\r
236         #include "frconfig.h"\r
237         #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
238     typedef void ( __interrupt __far *pxISR )();\r
239 #endif\r
240 \r
241 #ifdef __GNUC__\r
242    #ifdef __AVR32_AVR32A__\r
243            #include "portmacro.h"\r
244    #endif\r
245 #endif\r
246 \r
247 #ifdef __ICCAVR32__\r
248    #ifdef __CORE__\r
249       #if __CORE__ == __AVR32A__\r
250               #include "portmacro.h"\r
251       #endif\r
252    #endif\r
253 #endif\r
254 \r
255 #ifdef __91467D\r
256         #include "portmacro.h"\r
257 #endif\r
258 \r
259 #ifdef __96340\r
260         #include "portmacro.h"\r
261 #endif\r
262 \r
263 \r
264 #ifdef __IAR_V850ES_Fx3__\r
265         #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
266 #endif\r
267 \r
268 #ifdef __IAR_V850ES_Jx3__\r
269         #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
270 #endif\r
271 \r
272 #ifdef __IAR_V850ES_Jx3_L__\r
273         #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
274 #endif\r
275 \r
276 #ifdef __IAR_V850ES_Jx2__\r
277         #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
278 #endif\r
279 \r
280 #ifdef __IAR_V850ES_Hx2__\r
281         #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
282 #endif\r
283 \r
284 #ifdef __IAR_78KOR_Kx3__\r
285         #include "../../Source/portable/IAR/78K0R/portmacro.h"\r
286 #endif\r
287         \r
288         \r
289 #ifdef __cplusplus\r
290 extern "C" {\r
291 #endif\r
292 \r
293 /*\r
294  * Setup the stack of a new task so it is ready to be placed under the\r
295  * scheduler control.  The registers have to be placed on the stack in\r
296  * the order that the port expects to find them.\r
297  */\r
298 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );\r
299 \r
300 /*\r
301  * Map to the memory management routines required for the port.\r
302  */\r
303 void *pvPortMalloc( size_t xSize );\r
304 void vPortFree( void *pv );\r
305 void vPortInitialiseBlocks( void );\r
306 \r
307 /*\r
308  * Setup the hardware ready for the scheduler to take control.  This generally\r
309  * sets up a tick interrupt and sets timers for the correct tick frequency.\r
310  */\r
311 portBASE_TYPE xPortStartScheduler( void );\r
312 \r
313 /*\r
314  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
315  * the hardware is left in its original condition after the scheduler stops\r
316  * executing.\r
317  */\r
318 void vPortEndScheduler( void );\r
319 \r
320 #ifdef __cplusplus\r
321 }\r
322 #endif\r
323 \r
324 #endif /* PORTABLE_H */\r
325 \r