2 FreeRTOS V7.5.1 - Copyright (C) 2013 Real Time Engineers Ltd.
\r
4 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
6 ***************************************************************************
\r
8 * FreeRTOS provides completely free yet professionally developed, *
\r
9 * robust, strictly quality controlled, supported, and cross *
\r
10 * platform software that has become a de facto standard. *
\r
12 * Help yourself get started quickly and support the FreeRTOS *
\r
13 * project by purchasing a FreeRTOS tutorial book, reference *
\r
14 * manual, or both from: http://www.FreeRTOS.org/Documentation *
\r
18 ***************************************************************************
\r
20 This file is part of the FreeRTOS distribution.
\r
22 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
23 the terms of the GNU General Public License (version 2) as published by the
\r
24 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
\r
26 >>! NOTE: The modification to the GPL is included to allow you to distribute
\r
27 >>! a combined work that includes FreeRTOS without being obliged to provide
\r
28 >>! the source code for proprietary components outside of the FreeRTOS
\r
31 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
32 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
33 FOR A PARTICULAR PURPOSE. Full license text is available from the following
\r
34 link: http://www.freertos.org/a00114.html
\r
38 ***************************************************************************
\r
40 * Having a problem? Start by reading the FAQ "My application does *
\r
41 * not run, what could be wrong?" *
\r
43 * http://www.FreeRTOS.org/FAQHelp.html *
\r
45 ***************************************************************************
\r
47 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
48 license and Real Time Engineers Ltd. contact details.
\r
50 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
51 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
52 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
54 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
55 Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
56 licenses offer ticketed support, indemnification and middleware.
\r
58 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
59 engineered and independently SIL3 certified version for use in safety and
\r
60 mission critical applications that require provable dependability.
\r
65 /*-----------------------------------------------------------
\r
66 * Portable layer API. Each function must be defined for each port.
\r
67 *----------------------------------------------------------*/
\r
72 /* Include the macro file relevant to the port being used. */
\r
74 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
\r
75 #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
\r
76 typedef void ( __interrupt __far *pxISR )();
\r
79 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
\r
80 #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"
\r
81 typedef void ( __interrupt __far *pxISR )();
\r
85 #include "../portable/GCC/ATMega323/portmacro.h"
\r
89 #include "../portable/IAR/ATMega323/portmacro.h"
\r
92 #ifdef MPLAB_PIC24_PORT
\r
93 #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
\r
96 #ifdef MPLAB_DSPIC_PORT
\r
97 #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"
\r
100 #ifdef MPLAB_PIC18F_PORT
\r
101 #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"
\r
104 #ifdef MPLAB_PIC32MX_PORT
\r
105 #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"
\r
109 #include "libFreeRTOS/Include/portmacro.h"
\r
113 #include "../../Source/portable/SDCC/Cygnal/portmacro.h"
\r
117 #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
\r
120 #ifdef GCC_ARM7_ECLIPSE
\r
121 #include "portmacro.h"
\r
124 #ifdef ROWLEY_LPC23xx
\r
125 #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
\r
129 #include "..\..\Source\portable\IAR\MSP430\portmacro.h"
\r
133 #include "../../Source/portable/GCC/MSP430F449/portmacro.h"
\r
136 #ifdef ROWLEY_MSP430
\r
137 #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
\r
140 #ifdef ARM7_LPC21xx_KEIL_RVDS
\r
141 #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"
\r
145 #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
\r
149 #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
\r
153 #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"
\r
157 #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
\r
161 #include "..\..\Source\portable\IAR\STR71x\portmacro.h"
\r
165 #include "..\..\Source\portable\IAR\STR75x\portmacro.h"
\r
169 #include "..\..\Source\portable\GCC\STR75x\portmacro.h"
\r
173 #include "..\..\Source\portable\IAR\STR91x\portmacro.h"
\r
177 #include "../../Source/portable/GCC/H8S2329/portmacro.h"
\r
180 #ifdef GCC_AT91FR40008
\r
181 #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
\r
184 #ifdef RVDS_ARMCM3_LM3S102
\r
185 #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
\r
188 #ifdef GCC_ARMCM3_LM3S102
\r
189 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
193 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
197 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
200 #ifdef IAR_ARMCM3_LM
\r
201 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
204 #ifdef HCS12_CODE_WARRIOR
\r
205 #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
\r
208 #ifdef MICROBLAZE_GCC
\r
209 #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
\r
213 #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
\r
217 #include "../../Source/portable/GCC/HCS12/portmacro.h"
\r
221 #include "../../Source/portable/GCC/MCF5235/portmacro.h"
\r
224 #ifdef COLDFIRE_V2_GCC
\r
225 #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"
\r
228 #ifdef COLDFIRE_V2_CODEWARRIOR
\r
229 #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"
\r
233 #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"
\r
237 #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"
\r
240 #ifdef _16FX_SOFTUNE
\r
241 #include "..\..\Source\portable\Softune\MB96340\portmacro.h"
\r
244 #ifdef BCC_INDUSTRIAL_PC_PORT
\r
245 /* A short file name has to be used in place of the normal
\r
246 FreeRTOSConfig.h when using the Borland compiler. */
\r
247 #include "frconfig.h"
\r
248 #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"
\r
249 typedef void ( __interrupt __far *pxISR )();
\r
252 #ifdef BCC_FLASH_LITE_186_PORT
\r
253 /* A short file name has to be used in place of the normal
\r
254 FreeRTOSConfig.h when using the Borland compiler. */
\r
255 #include "frconfig.h"
\r
256 #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
\r
257 typedef void ( __interrupt __far *pxISR )();
\r
261 #ifdef __AVR32_AVR32A__
\r
262 #include "portmacro.h"
\r
266 #ifdef __ICCAVR32__
\r
268 #if __CORE__ == __AVR32A__
\r
269 #include "portmacro.h"
\r
275 #include "portmacro.h"
\r
279 #include "portmacro.h"
\r
283 #ifdef __IAR_V850ES_Fx3__
\r
284 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
287 #ifdef __IAR_V850ES_Jx3__
\r
288 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
291 #ifdef __IAR_V850ES_Jx3_L__
\r
292 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
295 #ifdef __IAR_V850ES_Jx2__
\r
296 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
299 #ifdef __IAR_V850ES_Hx2__
\r
300 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
303 #ifdef __IAR_78K0R_Kx3__
\r
304 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
307 #ifdef __IAR_78K0R_Kx3L__
\r
308 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
311 /* Catch all to ensure portmacro.h is included in the build. Newer demos
\r
312 have the path as part of the project options, rather than as relative from
\r
313 the project location. If portENTER_CRITICAL() has not been defined then
\r
314 portmacro.h has not yet been included - as every portmacro.h provides a
\r
315 portENTER_CRITICAL() definition. Check the demo application for your demo
\r
316 to find the path to the correct portmacro.h file. */
\r
317 #ifndef portENTER_CRITICAL
\r
318 #include "portmacro.h"
\r
321 #if portBYTE_ALIGNMENT == 8
\r
322 #define portBYTE_ALIGNMENT_MASK ( 0x0007 )
\r
325 #if portBYTE_ALIGNMENT == 4
\r
326 #define portBYTE_ALIGNMENT_MASK ( 0x0003 )
\r
329 #if portBYTE_ALIGNMENT == 2
\r
330 #define portBYTE_ALIGNMENT_MASK ( 0x0001 )
\r
333 #if portBYTE_ALIGNMENT == 1
\r
334 #define portBYTE_ALIGNMENT_MASK ( 0x0000 )
\r
337 #ifndef portBYTE_ALIGNMENT_MASK
\r
338 #error "Invalid portBYTE_ALIGNMENT definition"
\r
341 #ifndef portNUM_CONFIGURABLE_REGIONS
\r
342 #define portNUM_CONFIGURABLE_REGIONS 1
\r
349 #include "mpu_wrappers.h"
\r
352 * Setup the stack of a new task so it is ready to be placed under the
\r
353 * scheduler control. The registers have to be placed on the stack in
\r
354 * the order that the port expects to find them.
\r
357 #if( portUSING_MPU_WRAPPERS == 1 )
\r
358 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION;
\r
360 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;
\r
364 * Map to the memory management routines required for the port.
\r
366 void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
\r
367 void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
\r
368 void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
\r
369 size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
\r
372 * Setup the hardware ready for the scheduler to take control. This generally
\r
373 * sets up a tick interrupt and sets timers for the correct tick frequency.
\r
375 portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION;
\r
378 * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so
\r
379 * the hardware is left in its original condition after the scheduler stops
\r
382 void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
\r
385 * The structures and methods of manipulating the MPU are contained within the
\r
388 * Fills the xMPUSettings structure with the memory region information
\r
389 * contained in xRegions.
\r
391 #if( portUSING_MPU_WRAPPERS == 1 )
\r
392 struct xMEMORY_REGION;
\r
393 void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;
\r
400 #endif /* PORTABLE_H */
\r