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