2 FreeRTOS V7.0.1 - Copyright (C) 2011 Real Time Engineers Ltd.
\r
5 FreeRTOS supports many tools and architectures. V7.0.0 is sponsored by:
\r
6 Atollic AB - Atollic provides professional embedded systems development
\r
7 tools for C/C++ development, code analysis and test automation.
\r
8 See http://www.atollic.com
\r
11 ***************************************************************************
\r
13 * FreeRTOS tutorial books are available in pdf and paperback. *
\r
14 * Complete, revised, and edited pdf reference manuals are also *
\r
17 * Purchasing FreeRTOS documentation will not only help you, by *
\r
18 * ensuring you get running as quickly as possible and with an *
\r
19 * in-depth knowledge of how to use FreeRTOS, it will also help *
\r
20 * the FreeRTOS project to continue with its mission of providing *
\r
21 * professional grade, cross platform, de facto standard solutions *
\r
22 * for microcontrollers - completely free of charge! *
\r
24 * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
\r
26 * Thank you for using FreeRTOS, and thank you for your support! *
\r
28 ***************************************************************************
\r
31 This file is part of the FreeRTOS distribution.
\r
33 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
34 the terms of the GNU General Public License (version 2) as published by the
\r
35 Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
\r
36 >>>NOTE<<< The modification to the GPL is included to allow you to
\r
37 distribute a combined work that includes FreeRTOS without being obliged to
\r
38 provide the source code for proprietary components outside of the FreeRTOS
\r
39 kernel. FreeRTOS is distributed in the hope that it will be useful, but
\r
40 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
\r
41 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
42 more details. You should have received a copy of the GNU General Public
\r
43 License and the FreeRTOS license exception along with FreeRTOS; if not it
\r
44 can be viewed here: http://www.freertos.org/a00114.html and also obtained
\r
45 by writing to Richard Barry, contact details for whom are available on the
\r
50 http://www.FreeRTOS.org - Documentation, latest information, license and
\r
53 http://www.SafeRTOS.com - A version that is certified for use in safety
\r
56 http://www.OpenRTOS.com - Commercial support, development, porting,
\r
57 licensing and training services.
\r
60 /*-----------------------------------------------------------
\r
61 * Portable layer API. Each function must be defined for each port.
\r
62 *----------------------------------------------------------*/
\r
67 /* Include the macro file relevant to the port being used. */
\r
69 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
\r
70 #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
\r
71 typedef void ( __interrupt __far *pxISR )();
\r
74 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
\r
75 #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"
\r
76 typedef void ( __interrupt __far *pxISR )();
\r
80 #include "../portable/GCC/ATMega323/portmacro.h"
\r
84 #include "../portable/IAR/ATMega323/portmacro.h"
\r
87 #ifdef MPLAB_PIC24_PORT
\r
88 #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
\r
91 #ifdef MPLAB_DSPIC_PORT
\r
92 #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
\r
95 #ifdef MPLAB_PIC18F_PORT
\r
96 #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"
\r
99 #ifdef MPLAB_PIC32MX_PORT
\r
100 #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"
\r
104 #include "libFreeRTOS/Include/portmacro.h"
\r
108 #include "../../Source/portable/SDCC/Cygnal/portmacro.h"
\r
112 #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
\r
115 #ifdef GCC_ARM7_ECLIPSE
\r
116 #include "portmacro.h"
\r
119 #ifdef ROWLEY_LPC23xx
\r
120 #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
\r
124 #include "..\..\Source\portable\IAR\MSP430\portmacro.h"
\r
128 #include "../../Source/portable/GCC/MSP430F449/portmacro.h"
\r
131 #ifdef ROWLEY_MSP430
\r
132 #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
\r
135 #ifdef ARM7_LPC21xx_KEIL_RVDS
\r
136 #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"
\r
140 #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
\r
144 #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
\r
148 #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"
\r
152 #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
\r
156 #include "..\..\Source\portable\IAR\STR71x\portmacro.h"
\r
160 #include "..\..\Source\portable\IAR\STR75x\portmacro.h"
\r
164 #include "..\..\Source\portable\GCC\STR75x\portmacro.h"
\r
168 #include "..\..\Source\portable\IAR\STR91x\portmacro.h"
\r
172 #include "../../Source/portable/GCC/H8S2329/portmacro.h"
\r
175 #ifdef GCC_AT91FR40008
\r
176 #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
\r
179 #ifdef RVDS_ARMCM3_LM3S102
\r
180 #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
\r
183 #ifdef GCC_ARMCM3_LM3S102
\r
184 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
188 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
192 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
195 #ifdef IAR_ARMCM3_LM
\r
196 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
199 #ifdef HCS12_CODE_WARRIOR
\r
200 #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
\r
203 #ifdef MICROBLAZE_GCC
\r
204 #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
\r
208 #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
\r
212 #include "../../Source/portable/GCC/HCS12/portmacro.h"
\r
216 #include "../../Source/portable/GCC/MCF5235/portmacro.h"
\r
219 #ifdef COLDFIRE_V2_GCC
\r
220 #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"
\r
223 #ifdef COLDFIRE_V2_CODEWARRIOR
\r
224 #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"
\r
228 #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"
\r
232 #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"
\r
235 #ifdef _16FX_SOFTUNE
\r
236 #include "..\..\Source\portable\Softune\MB96340\portmacro.h"
\r
239 #ifdef BCC_INDUSTRIAL_PC_PORT
\r
240 /* A short file name has to be used in place of the normal
\r
241 FreeRTOSConfig.h when using the Borland compiler. */
\r
242 #include "frconfig.h"
\r
243 #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"
\r
244 typedef void ( __interrupt __far *pxISR )();
\r
247 #ifdef BCC_FLASH_LITE_186_PORT
\r
248 /* A short file name has to be used in place of the normal
\r
249 FreeRTOSConfig.h when using the Borland compiler. */
\r
250 #include "frconfig.h"
\r
251 #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
\r
252 typedef void ( __interrupt __far *pxISR )();
\r
256 #ifdef __AVR32_AVR32A__
\r
257 #include "portmacro.h"
\r
261 #ifdef __ICCAVR32__
\r
263 #if __CORE__ == __AVR32A__
\r
264 #include "portmacro.h"
\r
270 #include "portmacro.h"
\r
274 #include "portmacro.h"
\r
278 #ifdef __IAR_V850ES_Fx3__
\r
279 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
282 #ifdef __IAR_V850ES_Jx3__
\r
283 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
286 #ifdef __IAR_V850ES_Jx3_L__
\r
287 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
290 #ifdef __IAR_V850ES_Jx2__
\r
291 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
294 #ifdef __IAR_V850ES_Hx2__
\r
295 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
298 #ifdef __IAR_78K0R_Kx3__
\r
299 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
302 #ifdef __IAR_78K0R_Kx3L__
\r
303 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
306 /* Catch all to ensure portmacro.h is included in the build. Newer demos
\r
307 have the path as part of the project options, rather than as relative from
\r
308 the project location. If portENTER_CRITICAL() has not been defined then
\r
309 portmacro.h has not yet been included - as every portmacro.h provides a
\r
310 portENTER_CRITICAL() definition. Check the demo application for your demo
\r
311 to find the path to the correct portmacro.h file. */
\r
312 #ifndef portENTER_CRITICAL
\r
313 #include "portmacro.h"
\r
316 #if portBYTE_ALIGNMENT == 8
\r
317 #define portBYTE_ALIGNMENT_MASK ( 0x0007 )
\r
320 #if portBYTE_ALIGNMENT == 4
\r
321 #define portBYTE_ALIGNMENT_MASK ( 0x0003 )
\r
324 #if portBYTE_ALIGNMENT == 2
\r
325 #define portBYTE_ALIGNMENT_MASK ( 0x0001 )
\r
328 #if portBYTE_ALIGNMENT == 1
\r
329 #define portBYTE_ALIGNMENT_MASK ( 0x0000 )
\r
332 #ifndef portBYTE_ALIGNMENT_MASK
\r
333 #error "Invalid portBYTE_ALIGNMENT definition"
\r
336 #ifndef portNUM_CONFIGURABLE_REGIONS
\r
337 #define portNUM_CONFIGURABLE_REGIONS 1
\r
344 #include "mpu_wrappers.h"
\r
347 * Setup the stack of a new task so it is ready to be placed under the
\r
348 * scheduler control. The registers have to be placed on the stack in
\r
349 * the order that the port expects to find them.
\r
352 #if( portUSING_MPU_WRAPPERS == 1 )
\r
353 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION;
\r
355 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );
\r
359 * Map to the memory management routines required for the port.
\r
361 void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
\r
362 void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
\r
363 void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
\r
364 size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
\r
367 * Setup the hardware ready for the scheduler to take control. This generally
\r
368 * sets up a tick interrupt and sets timers for the correct tick frequency.
\r
370 portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION;
\r
373 * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so
\r
374 * the hardware is left in its original condition after the scheduler stops
\r
377 void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
\r
380 * The structures and methods of manipulating the MPU are contained within the
\r
383 * Fills the xMPUSettings structure with the memory region information
\r
384 * contained in xRegions.
\r
386 #if( portUSING_MPU_WRAPPERS == 1 )
\r
387 struct xMEMORY_REGION;
\r
388 void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;
\r
395 #endif /* PORTABLE_H */
\r