2 FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd.
\r
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
\r
7 ***************************************************************************
\r
9 * FreeRTOS provides completely free yet professionally developed, *
\r
10 * robust, strictly quality controlled, supported, and cross *
\r
11 * platform software that has become a de facto standard. *
\r
13 * Help yourself get started quickly and support the FreeRTOS *
\r
14 * project by purchasing a FreeRTOS tutorial book, reference *
\r
15 * manual, or both from: http://www.FreeRTOS.org/Documentation *
\r
19 ***************************************************************************
\r
21 This file is part of the FreeRTOS distribution.
\r
23 FreeRTOS is free software; you can redistribute it and/or modify it under
\r
24 the terms of the GNU General Public License (version 2) as published by the
\r
25 Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
\r
27 >>! NOTE: The modification to the GPL is included to allow you to distribute
\r
28 >>! a combined work that includes FreeRTOS without being obliged to provide
\r
29 >>! the source code for proprietary components outside of the FreeRTOS
\r
32 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
\r
33 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
34 FOR A PARTICULAR PURPOSE. Full license text is available from the following
\r
35 link: http://www.freertos.org/a00114.html
\r
39 ***************************************************************************
\r
41 * Having a problem? Start by reading the FAQ "My application does *
\r
42 * not run, what could be wrong?" *
\r
44 * http://www.FreeRTOS.org/FAQHelp.html *
\r
46 ***************************************************************************
\r
48 http://www.FreeRTOS.org - Documentation, books, training, latest versions,
\r
49 license and Real Time Engineers Ltd. contact details.
\r
51 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
\r
52 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
\r
53 compatible FAT file system, and our tiny thread aware UDP/IP stack.
\r
55 http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
\r
56 Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
\r
57 licenses offer ticketed support, indemnification and middleware.
\r
59 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
\r
60 engineered and independently SIL3 certified version for use in safety and
\r
61 mission critical applications that require provable dependability.
\r
66 /*-----------------------------------------------------------
\r
67 * Portable layer API. Each function must be defined for each port.
\r
68 *----------------------------------------------------------*/
\r
73 /* Include the macro file relevant to the port being used.
\r
74 NOTE: The following definitions are *DEPRECATED* as it is preferred to instead
\r
75 just add the path to the correct portmacro.h header file to the compiler's
\r
77 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT
\r
78 #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"
\r
79 typedef void ( __interrupt __far *pxISR )();
\r
82 #ifdef OPEN_WATCOM_FLASH_LITE_186_PORT
\r
83 #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"
\r
84 typedef void ( __interrupt __far *pxISR )();
\r
88 #include "../portable/GCC/ATMega323/portmacro.h"
\r
92 #include "../portable/IAR/ATMega323/portmacro.h"
\r
95 #ifdef MPLAB_PIC24_PORT
\r
96 #include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"
\r
99 #ifdef MPLAB_DSPIC_PORT
\r
100 #include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"
\r
103 #ifdef MPLAB_PIC18F_PORT
\r
104 #include "../../Source/portable/MPLAB/PIC18F/portmacro.h"
\r
107 #ifdef MPLAB_PIC32MX_PORT
\r
108 #include "../../Source/portable/MPLAB/PIC32MX/portmacro.h"
\r
112 #include "libFreeRTOS/Include/portmacro.h"
\r
116 #include "../../Source/portable/SDCC/Cygnal/portmacro.h"
\r
120 #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"
\r
123 #ifdef GCC_ARM7_ECLIPSE
\r
124 #include "portmacro.h"
\r
127 #ifdef ROWLEY_LPC23xx
\r
128 #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"
\r
132 #include "..\..\Source\portable\IAR\MSP430\portmacro.h"
\r
136 #include "../../Source/portable/GCC/MSP430F449/portmacro.h"
\r
139 #ifdef ROWLEY_MSP430
\r
140 #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"
\r
143 #ifdef ARM7_LPC21xx_KEIL_RVDS
\r
144 #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"
\r
148 #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"
\r
152 #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"
\r
156 #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"
\r
160 #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"
\r
164 #include "..\..\Source\portable\IAR\STR71x\portmacro.h"
\r
168 #include "..\..\Source\portable\IAR\STR75x\portmacro.h"
\r
172 #include "..\..\Source\portable\GCC\STR75x\portmacro.h"
\r
176 #include "..\..\Source\portable\IAR\STR91x\portmacro.h"
\r
180 #include "../../Source/portable/GCC/H8S2329/portmacro.h"
\r
183 #ifdef GCC_AT91FR40008
\r
184 #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"
\r
187 #ifdef RVDS_ARMCM3_LM3S102
\r
188 #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"
\r
191 #ifdef GCC_ARMCM3_LM3S102
\r
192 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
196 #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"
\r
200 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
203 #ifdef IAR_ARMCM3_LM
\r
204 #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"
\r
207 #ifdef HCS12_CODE_WARRIOR
\r
208 #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"
\r
211 #ifdef MICROBLAZE_GCC
\r
212 #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"
\r
216 #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"
\r
220 #include "../../Source/portable/GCC/HCS12/portmacro.h"
\r
224 #include "../../Source/portable/GCC/MCF5235/portmacro.h"
\r
227 #ifdef COLDFIRE_V2_GCC
\r
228 #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"
\r
231 #ifdef COLDFIRE_V2_CODEWARRIOR
\r
232 #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"
\r
236 #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"
\r
240 #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"
\r
243 #ifdef _16FX_SOFTUNE
\r
244 #include "..\..\Source\portable\Softune\MB96340\portmacro.h"
\r
247 #ifdef BCC_INDUSTRIAL_PC_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\PC\prtmacro.h"
\r
252 typedef void ( __interrupt __far *pxISR )();
\r
255 #ifdef BCC_FLASH_LITE_186_PORT
\r
256 /* A short file name has to be used in place of the normal
\r
257 FreeRTOSConfig.h when using the Borland compiler. */
\r
258 #include "frconfig.h"
\r
259 #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"
\r
260 typedef void ( __interrupt __far *pxISR )();
\r
264 #ifdef __AVR32_AVR32A__
\r
265 #include "portmacro.h"
\r
269 #ifdef __ICCAVR32__
\r
271 #if __CORE__ == __AVR32A__
\r
272 #include "portmacro.h"
\r
278 #include "portmacro.h"
\r
282 #include "portmacro.h"
\r
286 #ifdef __IAR_V850ES_Fx3__
\r
287 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
290 #ifdef __IAR_V850ES_Jx3__
\r
291 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
294 #ifdef __IAR_V850ES_Jx3_L__
\r
295 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
298 #ifdef __IAR_V850ES_Jx2__
\r
299 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
302 #ifdef __IAR_V850ES_Hx2__
\r
303 #include "../../Source/portable/IAR/V850ES/portmacro.h"
\r
306 #ifdef __IAR_78K0R_Kx3__
\r
307 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
310 #ifdef __IAR_78K0R_Kx3L__
\r
311 #include "../../Source/portable/IAR/78K0R/portmacro.h"
\r
314 /* Catch all to ensure portmacro.h is included in the build. Newer demos
\r
315 have the path as part of the project options, rather than as relative from
\r
316 the project location. If portENTER_CRITICAL() has not been defined then
\r
317 portmacro.h has not yet been included - as every portmacro.h provides a
\r
318 portENTER_CRITICAL() definition. Check the demo application for your demo
\r
319 to find the path to the correct portmacro.h file. */
\r
320 #ifndef portENTER_CRITICAL
\r
321 #include "portmacro.h"
\r
324 #if portBYTE_ALIGNMENT == 8
\r
325 #define portBYTE_ALIGNMENT_MASK ( 0x0007 )
\r
328 #if portBYTE_ALIGNMENT == 4
\r
329 #define portBYTE_ALIGNMENT_MASK ( 0x0003 )
\r
332 #if portBYTE_ALIGNMENT == 2
\r
333 #define portBYTE_ALIGNMENT_MASK ( 0x0001 )
\r
336 #if portBYTE_ALIGNMENT == 1
\r
337 #define portBYTE_ALIGNMENT_MASK ( 0x0000 )
\r
340 #ifndef portBYTE_ALIGNMENT_MASK
\r
341 #error "Invalid portBYTE_ALIGNMENT definition"
\r
344 #ifndef portNUM_CONFIGURABLE_REGIONS
\r
345 #define portNUM_CONFIGURABLE_REGIONS 1
\r
352 #include "mpu_wrappers.h"
\r
355 * Setup the stack of a new task so it is ready to be placed under the
\r
356 * scheduler control. The registers have to be placed on the stack in
\r
357 * the order that the port expects to find them.
\r
360 #if( portUSING_MPU_WRAPPERS == 1 )
\r
361 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION;
\r
363 StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;
\r
367 * Map to the memory management routines required for the port.
\r
369 void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
\r
370 void vPortFree( void *pv ) PRIVILEGED_FUNCTION;
\r
371 void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
\r
372 size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
\r
373 size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;
\r
376 * Setup the hardware ready for the scheduler to take control. This generally
\r
377 * sets up a tick interrupt and sets timers for the correct tick frequency.
\r
379 BaseType_t xPortStartScheduler( void ) PRIVILEGED_FUNCTION;
\r
382 * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so
\r
383 * the hardware is left in its original condition after the scheduler stops
\r
386 void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
\r
389 * The structures and methods of manipulating the MPU are contained within the
\r
392 * Fills the xMPUSettings structure with the memory region information
\r
393 * contained in xRegions.
\r
395 #if( portUSING_MPU_WRAPPERS == 1 )
\r
396 struct xMEMORY_REGION;
\r
397 void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, StackType_t *pxBottomOfStack, uint16_t usStackDepth ) PRIVILEGED_FUNCTION;
\r
404 #endif /* PORTABLE_H */
\r