2 FreeRTOS V6.0.0 - Copyright (C) 2009 Real Time Engineers Ltd.
\r
4 This file is part of the FreeRTOS distribution.
\r
6 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
7 the terms of the GNU General Public License (version 2) as published by the
\r
8 Free Software Foundation and modified by the FreeRTOS exception.
\r
9 **NOTE** The exception to the GPL is included to allow you to distribute a
\r
10 combined work that includes FreeRTOS without being obliged to provide the
\r
11 source code for proprietary components outside of the FreeRTOS kernel.
\r
12 Alternative commercial license and support terms are also available upon
\r
13 request. See the licensing section of http://www.FreeRTOS.org for full
\r
16 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
\r
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
21 You should have received a copy of the GNU General Public License along
\r
22 with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
\r
23 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
\r
26 ***************************************************************************
\r
28 * The FreeRTOS eBook and reference manual are available to purchase for a *
\r
29 * small fee. Help yourself get started quickly while also helping the *
\r
30 * FreeRTOS project! See http://www.FreeRTOS.org/Documentation for details *
\r
32 ***************************************************************************
\r
36 Please ensure to read the configuration and relevant port sections of the
\r
37 online documentation.
\r
39 http://www.FreeRTOS.org - Documentation, latest information, license and
\r
42 http://www.SafeRTOS.com - A version that is certified for use in safety
\r
45 http://www.OpenRTOS.com - Commercial support, development, porting,
\r
46 licensing and training services.
\r
49 /*-----------------------------------------------------------
\r
50 * Portable layer API. Each function must be defined for each port.
\r
51 *----------------------------------------------------------*/
\r
56 /* Include the macro file relevant to the port being used. */
\r
58 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
\r
59 #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
\r
60 typedef void ( __interrupt __far *pxISR )();
\r
63 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
\r
64 #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"
\r
65 typedef void ( __interrupt __far *pxISR )();
\r
69 #include "../portable/GCC/ATMega323/portmacro.h"
\r
73 #include "../portable/IAR/ATMega323/portmacro.h"
\r
76 #ifdef MPLAB_PIC24_PORT
\r
77 #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
\r
80 #ifdef MPLAB_DSPIC_PORT
\r
81 #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
\r
84 #ifdef MPLAB_PIC18F_PORT
\r
85 #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"
\r
88 #ifdef MPLAB_PIC32MX_PORT
\r
89 #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"
\r
93 #include "libFreeRTOS/Include/portmacro.h"
\r
97 #include "../../Source/portable/SDCC/Cygnal/portmacro.h"
\r
101 #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
\r
104 #ifdef GCC_ARM7_ECLIPSE
\r
105 #include "portmacro.h"
\r
108 #ifdef ROWLEY_LPC23xx
\r
109 #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
\r
113 #include "..\..\Source\portable\IAR\MSP430\portmacro.h"
\r
117 #include "../../Source/portable/GCC/MSP430F449/portmacro.h"
\r
120 #ifdef ROWLEY_MSP430
\r
121 #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
\r
124 #ifdef ARM7_LPC21xx_KEIL_RVDS
\r
125 #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"
\r
129 #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
\r
133 #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
\r
137 #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"
\r
141 #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
\r
145 #include "..\..\Source\portable\IAR\STR71x\portmacro.h"
\r
149 #include "..\..\Source\portable\IAR\STR75x\portmacro.h"
\r
153 #include "..\..\Source\portable\GCC\STR75x\portmacro.h"
\r
157 #include "..\..\Source\portable\IAR\STR91x\portmacro.h"
\r
161 #include "../../Source/portable/GCC/H8S2329/portmacro.h"
\r
164 #ifdef GCC_AT91FR40008
\r
165 #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
\r
168 #ifdef RVDS_ARMCM3_LM3S102
\r
169 #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
\r
172 #ifdef GCC_ARMCM3_LM3S102
\r
173 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
177 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
181 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
184 #ifdef IAR_ARMCM3_LM
\r
185 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
188 #ifdef HCS12_CODE_WARRIOR
\r
189 #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
\r
192 #ifdef MICROBLAZE_GCC
\r
193 #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
\r
197 #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
\r
201 #include "../../Source/portable/GCC/HCS12/portmacro.h"
\r
205 #include "../../Source/portable/GCC/MCF5235/portmacro.h"
\r
208 #ifdef COLDFIRE_V2_GCC
\r
209 #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"
\r
212 #ifdef COLDFIRE_V2_CODEWARRIOR
\r
213 #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"
\r
217 #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"
\r
221 #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"
\r
224 #ifdef _16FX_SOFTUNE
\r
225 #include "..\..\Source\portable\Softune\MB96340\portmacro.h"
\r
228 #ifdef BCC_INDUSTRIAL_PC_PORT
\r
229 /* A short file name has to be used in place of the normal
\r
230 FreeRTOSConfig.h when using the Borland compiler. */
\r
231 #include "frconfig.h"
\r
232 #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"
\r
233 typedef void ( __interrupt __far *pxISR )();
\r
236 #ifdef BCC_FLASH_LITE_186_PORT
\r
237 /* A short file name has to be used in place of the normal
\r
238 FreeRTOSConfig.h when using the Borland compiler. */
\r
239 #include "frconfig.h"
\r
240 #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
\r
241 typedef void ( __interrupt __far *pxISR )();
\r
245 #ifdef __AVR32_AVR32A__
\r
246 #include "portmacro.h"
\r
250 #ifdef __ICCAVR32__
\r
252 #if __CORE__ == __AVR32A__
\r
253 #include "portmacro.h"
\r
259 #include "portmacro.h"
\r
263 #include "portmacro.h"
\r
267 #ifdef __IAR_V850ES_Fx3__
\r
268 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
271 #ifdef __IAR_V850ES_Jx3__
\r
272 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
275 #ifdef __IAR_V850ES_Jx3_L__
\r
276 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
279 #ifdef __IAR_V850ES_Jx2__
\r
280 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
283 #ifdef __IAR_V850ES_Hx2__
\r
284 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
287 #ifdef __IAR_78K0R_Kx3__
\r
288 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
291 #ifdef __IAR_78K0R_Kx3L__
\r
292 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
295 /* Catch all to ensure portmacro.h is included in the build. Newer demos
\r
296 have the path as part of the project options, rather than as relative from
\r
297 the project location. If portENTER_CRITICAL() has not been defined then
\r
298 portmacro.h has not yet been included - as every portmacro.h provides a
\r
299 portENTER_CRITICAL() definition. Check the demo application for your demo
\r
300 to find the path to the correct portmacro.h file. */
\r
301 #ifndef portENTER_CRITICAL
\r
302 #include "portmacro.h"
\r
305 #if portBYTE_ALIGNMENT == 8
\r
306 #define portBYTE_ALIGNMENT_MASK ( 0x0007 )
\r
309 #if portBYTE_ALIGNMENT == 4
\r
310 #define portBYTE_ALIGNMENT_MASK ( 0x0003 )
\r
313 #if portBYTE_ALIGNMENT == 2
\r
314 #define portBYTE_ALIGNMENT_MASK ( 0x0001 )
\r
317 #if portBYTE_ALIGNMENT == 1
\r
318 #define portBYTE_ALIGNMENT_MASK ( 0x0000 )
\r
321 #ifndef portBYTE_ALIGNMENT_MASK
\r
322 #error "Invalid portBYTE_ALIGNMENT definition"
\r
325 #ifndef portNUM_CONFIGURABLE_REGIONS
\r
326 #define portNUM_CONFIGURABLE_REGIONS 1
\r
333 #include "mpu_wrappers.h"
\r
336 * Setup the stack of a new task so it is ready to be placed under the
\r
337 * scheduler control. The registers have to be placed on the stack in
\r
338 * the order that the port expects to find them.
\r
341 #if( portUSING_MPU_WRAPPERS == 1 )
\r
342 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION;
\r
344 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters );
\r
348 * Map to the memory management routines required for the port.
\r
350 void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
\r
351 void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
\r
352 void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
\r
355 * Setup the hardware ready for the scheduler to take control. This generally
\r
356 * sets up a tick interrupt and sets timers for the correct tick frequency.
\r
358 portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION;
\r
361 * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so
\r
362 * the hardware is left in its original condition after the scheduler stops
\r
365 void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
\r
368 * The structures and methods of manipulating the MPU are contained within the
\r
371 * Fills the xMPUSettings structure with the memory region information
\r
372 * contained in xRegions.
\r
374 #if( portUSING_MPU_WRAPPERS == 1 )
\r
375 struct xMEMORY_REGION;
\r
376 void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;
\r
383 #endif /* PORTABLE_H */
\r