]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/include/portable.h
Update version numbers in preparation for new release.
[freertos] / FreeRTOS / Source / include / portable.h
index d86c3f678da7fc0bf8ae4f7cac3a80d9e961f86c..fd9be7952b31c0bb2059d8191ca10e9fb01dc6ad 100644 (file)
@@ -1,60 +1,64 @@
 /*\r
-    FreeRTOS V8.0.0:rc1 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+    FreeRTOS V8.2.2 - Copyright (C) 2015 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 \r
-    ***************************************************************************\r
-     *                                                                       *\r
-     *    FreeRTOS provides completely free yet professionally developed,    *\r
-     *    robust, strictly quality controlled, supported, and cross          *\r
-     *    platform software that has become a de facto standard.             *\r
-     *                                                                       *\r
-     *    Help yourself get started quickly and support the FreeRTOS         *\r
-     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
-     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
-     *                                                                       *\r
-     *    Thank you!                                                         *\r
-     *                                                                       *\r
-    ***************************************************************************\r
-\r
     This file is part of the FreeRTOS distribution.\r
 \r
     FreeRTOS is free software; you can redistribute it and/or modify it under\r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    ***************************************************************************\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
+    ***************************************************************************\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
-    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
     link: http://www.freertos.org/a00114.html\r
 \r
-    1 tab == 4 spaces!\r
-\r
     ***************************************************************************\r
      *                                                                       *\r
-     *    Having a problem?  Start by reading the FAQ "My application does   *\r
-     *    not run, what could be wrong?"                                     *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
      *                                                                       *\r
-     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
      *                                                                       *\r
     ***************************************************************************\r
 \r
-    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
-    license and Real Time Engineers Ltd. contact details.\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+    the FAQ page "My application does not run, what could be wrong?".  Have you\r
+    defined configASSERT()?\r
+\r
+    http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+    embedded software for free we request you assist our global community by\r
+    participating in the support forum.\r
+\r
+    http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+    be as productive as possible as early as possible.  Now you can receive\r
+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+    Ltd, and the world's leading authority on the world's leading RTOS.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
 \r
-    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
-    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
-    licenses offer ticketed support, indemnification and middleware.\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
 \r
     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
     engineered and independently SIL3 certified version for use in safety and\r
 #ifndef PORTABLE_H\r
 #define PORTABLE_H\r
 \r
-/* Include the macro file relevant to the port being used.\r
-NOTE:  The following definitions are *DEPRECATED* as it is preferred to instead\r
-just add the path to the correct portmacro.h header file to the compiler's\r
-include path. */\r
-#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
-       #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"\r
-       typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT\r
-       #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"\r
-       typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef GCC_MEGA_AVR\r
-       #include "../portable/GCC/ATMega323/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_MEGA_AVR\r
-       #include "../portable/IAR/ATMega323/portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_PIC24_PORT\r
-       #include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_DSPIC_PORT\r
-       #include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_PIC18F_PORT\r
-       #include "../../Source/portable/MPLAB/PIC18F/portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_PIC32MX_PORT\r
-       #include "../../Source/portable/MPLAB/PIC32MX/portmacro.h"\r
-#endif\r
-\r
-#ifdef _FEDPICC\r
-       #include "libFreeRTOS/Include/portmacro.h"\r
-#endif\r
-\r
-#ifdef SDCC_CYGNAL\r
-       #include "../../Source/portable/SDCC/Cygnal/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARM7\r
-       #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARM7_ECLIPSE\r
-       #include "portmacro.h"\r
-#endif\r
-\r
-#ifdef ROWLEY_LPC23xx\r
-       #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_MSP430\r
-       #include "..\..\Source\portable\IAR\MSP430\portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_MSP430\r
-       #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
-#endif\r
-\r
-#ifdef ROWLEY_MSP430\r
-       #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
-#endif\r
-\r
-#ifdef ARM7_LPC21xx_KEIL_RVDS\r
-       #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"\r
-#endif\r
-\r
-#ifdef SAM7_GCC\r
-       #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
-#endif\r
-\r
-#ifdef SAM7_IAR\r
-       #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
-#endif\r
-\r
-#ifdef SAM9XE_IAR\r
-       #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"\r
-#endif\r
-\r
-#ifdef LPC2000_IAR\r
-       #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
-#endif\r
-\r
-#ifdef STR71X_IAR\r
-       #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
-#endif\r
-\r
-#ifdef STR75X_IAR\r
-       #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
-#endif\r
-\r
-#ifdef STR75X_GCC\r
-       #include "..\..\Source\portable\GCC\STR75x\portmacro.h"\r
-#endif\r
-\r
-#ifdef STR91X_IAR\r
-       #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_H8S\r
-       #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_AT91FR40008\r
-       #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
-#endif\r
-\r
-#ifdef RVDS_ARMCM3_LM3S102\r
-       #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARMCM3_LM3S102\r
-       #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARMCM3\r
-       #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_ARM_CM3\r
-       #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_ARMCM3_LM\r
-       #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef HCS12_CODE_WARRIOR\r
-       #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
-#endif\r
-\r
-#ifdef MICROBLAZE_GCC\r
-       #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
-#endif\r
-\r
-#ifdef TERN_EE\r
-       #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_HCS12\r
-       #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_MCF5235\r
-    #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
-#endif\r
-\r
-#ifdef COLDFIRE_V2_GCC\r
-       #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"\r
-#endif\r
-\r
-#ifdef COLDFIRE_V2_CODEWARRIOR\r
-       #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_PPC405\r
-       #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_PPC440\r
-       #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"\r
-#endif\r
-\r
-#ifdef _16FX_SOFTUNE\r
-       #include "..\..\Source\portable\Softune\MB96340\portmacro.h"\r
-#endif\r
-\r
-#ifdef BCC_INDUSTRIAL_PC_PORT\r
-       /* A short file name has to be used in place of the normal\r
-       FreeRTOSConfig.h when using the Borland compiler. */\r
-       #include "frconfig.h"\r
-       #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
-    typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef BCC_FLASH_LITE_186_PORT\r
-       /* A short file name has to be used in place of the normal\r
-       FreeRTOSConfig.h when using the Borland compiler. */\r
-       #include "frconfig.h"\r
-       #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
-    typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef __GNUC__\r
-   #ifdef __AVR32_AVR32A__\r
-          #include "portmacro.h"\r
-   #endif\r
-#endif\r
-\r
-#ifdef __ICCAVR32__\r
-   #ifdef __CORE__\r
-      #if __CORE__ == __AVR32A__\r
-             #include "portmacro.h"\r
-      #endif\r
-   #endif\r
-#endif\r
-\r
-#ifdef __91467D\r
-       #include "portmacro.h"\r
-#endif\r
-\r
-#ifdef __96340\r
+/* Each FreeRTOS port has a unique portmacro.h header file.  Originally a\r
+pre-processor definition was used to ensure the pre-processor found the correct\r
+portmacro.h file for the port being used.  That scheme was deprecated in favour\r
+of setting the compiler's include path such that it found the correct\r
+portmacro.h file - removing the need for the constant and allowing the\r
+portmacro.h file to be located anywhere in relation to the port being used.\r
+Purely for reasons of backward compatibility the old method is still valid, but\r
+to make it clear that new projects should not use it, support for the port\r
+specific constants has been moved into the deprecated_definitions.h header\r
+file. */\r
+#include "deprecated_definitions.h"\r
+\r
+/* If portENTER_CRITICAL is not defined then including deprecated_definitions.h\r
+did not result in a portmacro.h header file being included - and it should be\r
+included here.  In this case the path to the correct portmacro.h header file\r
+must be set in the compiler's include path. */\r
+#ifndef portENTER_CRITICAL\r
        #include "portmacro.h"\r
 #endif\r
 \r
-\r
-#ifdef __IAR_V850ES_Fx3__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Jx3__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Jx3_L__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Jx2__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Hx2__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
+#if portBYTE_ALIGNMENT == 32\r
+       #define portBYTE_ALIGNMENT_MASK ( 0x001f )\r
 #endif\r
 \r
-#ifdef __IAR_78K0R_Kx3__\r
-       #include "../../Source/portable/IAR/78K0R/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_78K0R_Kx3L__\r
-       #include "../../Source/portable/IAR/78K0R/portmacro.h"\r
-#endif\r
-\r
-/* Catch all to ensure portmacro.h is included in the build.  Newer demos\r
-have the path as part of the project options, rather than as relative from\r
-the project location.  If portENTER_CRITICAL() has not been defined then\r
-portmacro.h has not yet been included - as every portmacro.h provides a\r
-portENTER_CRITICAL() definition.  Check the demo application for your demo\r
-to find the path to the correct portmacro.h file. */\r
-#ifndef portENTER_CRITICAL\r
-       #include "portmacro.h"\r
+#if portBYTE_ALIGNMENT == 16\r
+       #define portBYTE_ALIGNMENT_MASK ( 0x000f )\r
 #endif\r
 \r
 #if portBYTE_ALIGNMENT == 8\r
@@ -363,6 +144,27 @@ extern "C" {
        StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;\r
 #endif\r
 \r
+/* Used by heap_5.c. */\r
+typedef struct HeapRegion\r
+{\r
+       uint8_t *pucStartAddress;\r
+       size_t xSizeInBytes;\r
+} HeapRegion_t;\r
+\r
+/*\r
+ * Used to define multiple heap regions for use by heap_5.c.  This function\r
+ * must be called before any calls to pvPortMalloc() - not creating a task,\r
+ * queue, semaphore, mutex, software timer, event group, etc. will result in\r
+ * pvPortMalloc being called.\r
+ *\r
+ * pxHeapRegions passes in an array of HeapRegion_t structures - each of which\r
+ * defines a region of memory that can be used as the heap.  The array is\r
+ * terminated by a HeapRegions_t structure that has a size of 0.  The region\r
+ * with the lowest start address must appear first in the array.\r
+ */\r
+void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION;\r
+\r
+\r
 /*\r
  * Map to the memory management routines required for the port.\r
  */\r