]> git.sur5r.net Git - freertos/blob - Source/include/portable.h
Add ColdFire definitions.
[freertos] / Source / include / portable.h
1 /*\r
2         FreeRTOS.org V5.0.3 - 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 GCC_MSP430\r
114         #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
115 #endif\r
116 \r
117 #ifdef ROWLEY_MSP430\r
118         #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
119 #endif\r
120 \r
121 #ifdef KEIL_ARM7\r
122         #include "..\..\Source\portable\Keil\ARM7\portmacro.h"\r
123 #endif\r
124 \r
125 #ifdef SAM7_GCC\r
126         #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
127 #endif\r
128 \r
129 #ifdef SAM7_IAR\r
130         #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
131 #endif\r
132 \r
133 #ifdef LPC2000_IAR\r
134         #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
135 #endif\r
136 \r
137 #ifdef STR71X_IAR\r
138         #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
139 #endif\r
140 \r
141 #ifdef STR75X_IAR\r
142         #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
143 #endif\r
144         \r
145 #ifdef STR75X_GCC\r
146         #include "..\..\Source\portable\GCC\STR75x\portmacro.h"\r
147 #endif\r
148 \r
149 #ifdef STR91X_IAR\r
150         #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
151 #endif\r
152         \r
153 #ifdef GCC_H8S\r
154         #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
155 #endif\r
156 \r
157 #ifdef GCC_AT91FR40008\r
158         #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
159 #endif\r
160 \r
161 #ifdef RVDS_ARMCM3_LM3S102\r
162         #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
163 #endif\r
164 \r
165 #ifdef GCC_ARMCM3_LM3S102\r
166         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
167 #endif\r
168 \r
169 #ifdef GCC_ARMCM3\r
170         #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
171 #endif\r
172 \r
173 #ifdef IAR_ARM_CM3\r
174         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
175 #endif\r
176 \r
177 #ifdef IAR_ARMCM3_LM\r
178         #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
179 #endif\r
180         \r
181 #ifdef HCS12_CODE_WARRIOR\r
182         #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
183 #endif  \r
184 \r
185 #ifdef MICROBLAZE_GCC\r
186         #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
187 #endif\r
188 \r
189 #ifdef TERN_EE\r
190         #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
191 #endif\r
192 \r
193 #ifdef GCC_HCS12\r
194         #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
195 #endif\r
196 \r
197 #ifdef GCC_MCF5235\r
198     #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
199 #endif\r
200 \r
201 #ifdef COLDFIRE_V2_CODEWARRIOR\r
202         #include "../../source/portable/CodeWarrior/ColdFire_MCF52259/portmacro.h"\r
203 #endif\r
204 \r
205 #ifdef COLDFIRE_V2_GCC\r
206         #include "../../../source/portable/GCC/ColdFire_V2/portmacro.h"\r
207 #endif\r
208 \r
209 \r
210 #ifdef GCC_PPC405\r
211         #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"\r
212 #endif\r
213 \r
214 \r
215 #ifdef BCC_INDUSTRIAL_PC_PORT\r
216         /* A short file name has to be used in place of the normal\r
217         FreeRTOSConfig.h when using the Borland compiler. */\r
218         #include "frconfig.h"\r
219         #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
220     typedef void ( __interrupt __far *pxISR )();\r
221 #endif\r
222 \r
223 #ifdef BCC_FLASH_LITE_186_PORT\r
224         /* A short file name has to be used in place of the normal\r
225         FreeRTOSConfig.h when using the Borland compiler. */\r
226         #include "frconfig.h"\r
227         #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
228     typedef void ( __interrupt __far *pxISR )();\r
229 #endif\r
230 \r
231 #ifdef __GNUC__\r
232    #ifdef __AVR32_AVR32A__\r
233            #include "portmacro.h"\r
234    #endif\r
235 #endif\r
236 \r
237 #ifdef __ICCAVR32__\r
238    #ifdef __CORE__\r
239       #if __CORE__ == __AVR32A__\r
240               #include "portmacro.h"\r
241       #endif\r
242    #endif\r
243 #endif\r
244 \r
245 #ifdef __91467D\r
246         #include "portmacro.h"\r
247 #endif\r
248 \r
249 #ifdef __96340\r
250         #include "portmacro.h"\r
251 #endif\r
252 \r
253 #ifdef __cplusplus\r
254 extern "C" {\r
255 #endif\r
256 /*\r
257  * Setup the stack of a new task so it is ready to be placed under the\r
258  * scheduler control.  The registers have to be placed on the stack in\r
259  * the order that the port expects to find them.\r
260  */\r
261 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );\r
262 \r
263 /*\r
264  * Map to the memory management routines required for the port.\r
265  */\r
266 void *pvPortMalloc( size_t xSize );\r
267 void vPortFree( void *pv );\r
268 void vPortInitialiseBlocks( void );\r
269 \r
270 /*\r
271  * Setup the hardware ready for the scheduler to take control.  This generally\r
272  * sets up a tick interrupt and sets timers for the correct tick frequency.\r
273  */\r
274 portBASE_TYPE xPortStartScheduler( void );\r
275 \r
276 /*\r
277  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
278  * the hardware is left in its original condition after the scheduler stops\r
279  * executing.\r
280  */\r
281 void vPortEndScheduler( void );\r
282 \r
283 #ifdef __cplusplus\r
284 }\r
285 #endif\r
286 \r
287 #endif /* PORTABLE_H */\r
288 \r