/*\r
- FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ FreeRTOS V8.2.0rc1 - Copyright (C) 2014 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
+ >>! 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
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
* Having a problem? Start by reading the FAQ "My application does *\r
- * not run, what could be wrong?" *\r
+ * not run, what could be wrong?". Have you defined configASSERT()? *\r
* *\r
* http://www.FreeRTOS.org/FAQHelp.html *\r
* *\r
***************************************************************************\r
\r
+ ***************************************************************************\r
+ * *\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
+ * 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
+ ***************************************************************************\r
+ * *\r
+ * Investing in training allows your team to be as productive as *\r
+ * possible as early as possible, lowering your overall development *\r
+ * cost, and enabling you to bring a more robust product to market *\r
+ * earlier than would otherwise be possible. Richard Barry is both *\r
+ * the architect and key author of FreeRTOS, and so also the world's *\r
+ * leading authority on what is the world's most popular real time *\r
+ * kernel for deeply embedded MCU designs. Obtaining your training *\r
+ * from Richard ensures your team will gain directly from his in-depth *\r
+ * product knowledge and years of usage experience. Contact Real Time *\r
+ * Engineers Ltd to enquire about the FreeRTOS Masterclass, presented *\r
+ * by Richard Barry: http://www.FreeRTOS.org/contact\r
+ * *\r
+ ***************************************************************************\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * You are receiving this top quality software for free. Please play *\r
+ * fair and reciprocate by reporting any suspected issues and *\r
+ * participating in the community forum: *\r
+ * http://www.FreeRTOS.org/support *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\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.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 to sell under the OpenRTOS brand. Low cost OpenRTOS\r
- licenses offer ticketed support, indemnification and middleware.\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
-\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
- #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
-#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
+/* 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
#if portBYTE_ALIGNMENT == 8\r
- #define portBYTE_ALIGNMENT_MASK ( 0x0007 )\r
+ #define portBYTE_ALIGNMENT_MASK ( 0x0007U )\r
#endif\r
\r
#if portBYTE_ALIGNMENT == 4\r
*\r
*/\r
#if( portUSING_MPU_WRAPPERS == 1 )\r
- portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION;\r
+ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION;\r
#else\r
- portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;\r
+ 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 );\r
+\r
+\r
/*\r
* Map to the memory management routines required for the port.\r
*/\r
void vPortFree( void *pv ) PRIVILEGED_FUNCTION;\r
void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;\r
size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;\r
+size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;\r
\r
/*\r
* Setup the hardware ready for the scheduler to take control. This generally\r
* sets up a tick interrupt and sets timers for the correct tick frequency.\r
*/\r
-portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION;\r
+BaseType_t xPortStartScheduler( void ) PRIVILEGED_FUNCTION;\r
\r
/*\r
* Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
*/\r
#if( portUSING_MPU_WRAPPERS == 1 )\r
struct xMEMORY_REGION;\r
- void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;\r
+ void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, StackType_t *pxBottomOfStack, uint16_t usStackDepth ) PRIVILEGED_FUNCTION;\r
#endif\r
\r
#ifdef __cplusplus\r