]> git.sur5r.net Git - freertos/commitdiff
FreeRTOS source changes:
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 22 Nov 2015 21:14:39 +0000 (21:14 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 22 Nov 2015 21:14:39 +0000 (21:14 +0000)
+ heap_1.c and heap_2.c now support configAPPLICATION_ALLOCATED_HEAP (heap_4.c already did) which allows the heap to be placed by the user rather than the linker.

Demo app changes:
+ SAMD20 project has been updated to use Atmel Studio 7.

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2394 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/RTOSDemo.cproj
FreeRTOS/Demo/CORTEX_M0+_Atmel_SAMD20_XPlained/RTOSDemo/src/main.c
FreeRTOS/License/license.txt
FreeRTOS/Source/portable/MemMang/heap_1.c
FreeRTOS/Source/portable/MemMang/heap_2.c

index f6369af17c6ea6a6ac2f6119bca6c28d43ffc8a1..8f0de0298c10e2bc54daf70a49cba129029553bf 100644 (file)
@@ -2,7 +2,7 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">\r
   <PropertyGroup>\r
     <SchemaVersion>2.0</SchemaVersion>\r
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">\r
   <PropertyGroup>\r
     <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectVersion>6.1</ProjectVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
     <ProjectGuid>{2a475b6a-78b0-4237-8947-341bd379ab5c}</ProjectGuid>\r
     <Name>$(MSBuildProjectName)</Name>\r
     <AssemblyName>$(MSBuildProjectName)</AssemblyName>\r
     <ProjectGuid>{2a475b6a-78b0-4237-8947-341bd379ab5c}</ProjectGuid>\r
     <Name>$(MSBuildProjectName)</Name>\r
     <AssemblyName>$(MSBuildProjectName)</AssemblyName>\r
         <documentation help="http://asf.atmel.com/docs/3.11.0/common.applications.user_application.xplained_pro2.samd20_xplained_pro/html/index.html" />\r
         <offline-documentation help="" />\r
         <dependencies>\r
         <documentation help="http://asf.atmel.com/docs/3.11.0/common.applications.user_application.xplained_pro2.samd20_xplained_pro/html/index.html" />\r
         <offline-documentation help="" />\r
         <dependencies>\r
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.11.0" />\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.18.1" />\r
         </dependencies>\r
         <project id="common.applications.user_application.xplained_pro2.samd20_xplained_pro" value="Add" config="" content-id="Atmel.ASF" />\r
         <board id="board.samd20_xplained_pro" value="Add" config="" content-id="Atmel.ASF" />\r
         </dependencies>\r
         <project id="common.applications.user_application.xplained_pro2.samd20_xplained_pro" value="Add" config="" content-id="Atmel.ASF" />\r
         <board id="board.samd20_xplained_pro" value="Add" config="" content-id="Atmel.ASF" />\r
       <ToolNumber>000591000435</ToolNumber>\r
       <ToolName>J-Link</ToolName>\r
     </com_atmel_avrdbg_tool_samice>\r
       <ToolNumber>000591000435</ToolNumber>\r
       <ToolName>J-Link</ToolName>\r
     </com_atmel_avrdbg_tool_samice>\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <ExternalProgrammingToolCommand />\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
     <ToolchainSettings>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
     <ToolchainSettings>\r
   </armgcc.linker.libraries.LibrarySearchPaths>\r
   <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>\r
   <armgcc.linker.miscellaneous.LinkerFlags>-Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam0/utils/linker_scripts/samd20/gcc/samd20j18_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>\r
   </armgcc.linker.libraries.LibrarySearchPaths>\r
   <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>\r
   <armgcc.linker.miscellaneous.LinkerFlags>-Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam0/utils/linker_scripts/samd20/gcc/samd20j18_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>\r
-  <armgcc.assembler.general.IncludePaths>\r
-    <ListValues>\r
-      <Value>../src</Value>\r
-      <Value>../src/ASF/common/boards</Value>\r
-      <Value>../src/ASF/common/utils</Value>\r
-      <Value>../src/ASF/sam0/boards</Value>\r
-      <Value>../src/ASF/sam0/boards/samd20_xplained_pro</Value>\r
-      <Value>../src/ASF/sam0/drivers/port</Value>\r
-      <Value>../src/ASF/sam0/drivers/system</Value>\r
-      <Value>../src/ASF/sam0/drivers/system/clock</Value>\r
-      <Value>../src/ASF/sam0/drivers/system/interrupt</Value>\r
-      <Value>../src/ASF/sam0/drivers/system/pinmux</Value>\r
-      <Value>../src/ASF/sam0/utils</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include/component</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include/instance</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include/pio</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/source</Value>\r
-      <Value>../src/ASF/sam0/utils/header_files</Value>\r
-      <Value>../src/ASF/sam0/utils/preprocessor</Value>\r
-      <Value>../src/ASF/thirdparty/CMSIS/Include</Value>\r
-      <Value>../src/ASF/thirdparty/CMSIS/Lib/GCC</Value>\r
-      <Value>../src/config</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel\CMSIS\Include</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel\Device\ATMEL</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel\Device\ATMEL\samd20\include</Value>\r
-      <Value>../src/ASF/common/services/serial</Value>\r
-      <Value>../src/ASF/sam0/drivers/sercom</Value>\r
-      <Value>../src/ASF/sam0/drivers/sercom/usart</Value>\r
-    </ListValues>\r
-  </armgcc.assembler.general.IncludePaths>\r
   <armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0=true -DBOARD=SAMD20_XPLAINED_PRO -D__SAMD20J18__ -DUSART_CALLBACK_MODE=true</armgcc.preprocessingassembler.general.AssemblerFlags>\r
   <armgcc.preprocessingassembler.general.IncludePaths>\r
     <ListValues>\r
   <armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0=true -DBOARD=SAMD20_XPLAINED_PRO -D__SAMD20J18__ -DUSART_CALLBACK_MODE=true</armgcc.preprocessingassembler.general.AssemblerFlags>\r
   <armgcc.preprocessingassembler.general.IncludePaths>\r
     <ListValues>\r
   </armgcc.linker.libraries.LibrarySearchPaths>\r
   <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>\r
   <armgcc.linker.miscellaneous.LinkerFlags>-Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam0/utils/linker_scripts/samd20/gcc/samd20j18_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>\r
   </armgcc.linker.libraries.LibrarySearchPaths>\r
   <armgcc.linker.optimization.GarbageCollectUnusedSections>True</armgcc.linker.optimization.GarbageCollectUnusedSections>\r
   <armgcc.linker.miscellaneous.LinkerFlags>-Wl,--entry=Reset_Handler -Wl,--cref -mthumb -T../src/ASF/sam0/utils/linker_scripts/samd20/gcc/samd20j18_flash.ld</armgcc.linker.miscellaneous.LinkerFlags>\r
-  <armgcc.assembler.general.IncludePaths>\r
-    <ListValues>\r
-      <Value>../src</Value>\r
-      <Value>../src/ASF/common/boards</Value>\r
-      <Value>../src/ASF/common/utils</Value>\r
-      <Value>../src/ASF/sam0/boards</Value>\r
-      <Value>../src/ASF/sam0/boards/samd20_xplained_pro</Value>\r
-      <Value>../src/ASF/sam0/drivers/port</Value>\r
-      <Value>../src/ASF/sam0/drivers/system</Value>\r
-      <Value>../src/ASF/sam0/drivers/system/clock</Value>\r
-      <Value>../src/ASF/sam0/drivers/system/interrupt</Value>\r
-      <Value>../src/ASF/sam0/drivers/system/pinmux</Value>\r
-      <Value>../src/ASF/sam0/utils</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include/component</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include/instance</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/include/pio</Value>\r
-      <Value>../src/ASF/sam0/utils/cmsis/samd20/source</Value>\r
-      <Value>../src/ASF/sam0/utils/header_files</Value>\r
-      <Value>../src/ASF/sam0/utils/preprocessor</Value>\r
-      <Value>../src/ASF/thirdparty/CMSIS/Include</Value>\r
-      <Value>../src/ASF/thirdparty/CMSIS/Lib/GCC</Value>\r
-      <Value>../src/config</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel\CMSIS\Include</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel\Device\ATMEL</Value>\r
-      <Value>%24(ToolchainDir)\..\..\CMSIS_Atmel\Device\ATMEL\samd20\include</Value>\r
-      <Value>../src/ASF/common/services/serial</Value>\r
-      <Value>../src/ASF/sam0/drivers/sercom</Value>\r
-      <Value>../src/ASF/sam0/drivers/sercom/usart</Value>\r
-    </ListValues>\r
-  </armgcc.assembler.general.IncludePaths>\r
   <armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>\r
   <armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0=true -DBOARD=SAMD20_XPLAINED_PRO -D__SAMD20J18__ -DUSART_CALLBACK_MODE=true</armgcc.preprocessingassembler.general.AssemblerFlags>\r
   <armgcc.preprocessingassembler.general.IncludePaths>\r
   <armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>\r
   <armgcc.preprocessingassembler.general.AssemblerFlags>-DARM_MATH_CM0=true -DBOARD=SAMD20_XPLAINED_PRO -D__SAMD20J18__ -DUSART_CALLBACK_MODE=true</armgcc.preprocessingassembler.general.AssemblerFlags>\r
   <armgcc.preprocessingassembler.general.IncludePaths>\r
index e385ece546ec98577c9bb9c1416b4a2bdbce1e50..c244efdf452dab5050c848ed40dd430d1b39c1ac 100644 (file)
@@ -137,7 +137,7 @@ int main (void)
 \r
        /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
        of this file. */\r
 \r
        /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
        of this file. */\r
-       #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1\r
+       #if( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )\r
        {\r
                main_blinky();\r
        }\r
        {\r
                main_blinky();\r
        }\r
index f96767fc1288235a8f94463b84c9db61da4048eb..9667958cac52209b02175235072f062e7c8adc1b 100644 (file)
@@ -1,17 +1,30 @@
+The FreeRTOS open source license covers the FreeRTOS source files,\r
+which are located in the /FreeRTOS/Source directory of the official FreeRTOS\r
+download.  It also covers most of the source files in the demo application\r
+projects, which are located in the /FreeRTOS/Demo directory of the official\r
+FreeRTOS download.  The demo projects may also include third party software that\r
+is not part of FreeRTOS and is licensed separately to FreeRTOS.  Examples of\r
+third party software includes header files provided by chip or tools vendors,\r
+linker scripts, peripheral drivers, etc.  All the software in subdirectories of\r
+the /FreeRTOS directory is either open source or distributed with permission,\r
+and is free for use.  For the avoidance of doubt, refer to the comments at the\r
+top of each source file.\r
+\r
 ----------------------------------------------------------------------------\r
 \r
 ----------------------------------------------------------------------------\r
 \r
-NOTE: The modification to the GPL documented below is included to allow you to\r
-distribute a combined work that includes FreeRTOS without being obliged to\r
-provide the source code for proprietary components.\r
+NOTE: The modification to the GPL is included to allow you to distribute a\r
+combined work that includes FreeRTOS without being obliged to provide the source\r
+code for proprietary components.\r
 \r
 ----------------------------------------------------------------------------\r
 \r
 \r
 ----------------------------------------------------------------------------\r
 \r
-The FreeRTOS GPL Exception Text:\r
+Applying to FreeRTOS V8.2.3 up to the latest version, the FreeRTOS GPL Exception\r
+Text follows:\r
 \r
 \r
-Any FreeRTOS source code, whether modified or in it's original release form,\r
+Any FreeRTOS *source code*, whether modified or in it's original release form,\r
 or whether in whole or in part, can only be distributed by you under the terms\r
 or whether in whole or in part, can only be distributed by you under the terms\r
-of version 2 of the GNU General Public License plus this exception.  An\r
-independent module is a module which is not derived from or based on FreeRTOS.\r
+of the GNU General Public License plus this exception.  An independent module is\r
+a module which is not derived from or based on FreeRTOS.\r
 \r
 Clause 1:\r
 \r
 \r
 Clause 1:\r
 \r
@@ -35,9 +48,12 @@ express permission of Real Time Engineers Ltd. (this is the norm within the
 industry and is intended to ensure information accuracy).\r
 \r
 \r
 industry and is intended to ensure information accuracy).\r
 \r
 \r
+\r
 --------------------------------------------------------------------\r
 \r
 --------------------------------------------------------------------\r
 \r
-The standard GPL v2 text follows:\r
+\r
+\r
+The standard GPL V2 text:\r
 \r
 \r
                    GNU GENERAL PUBLIC LICENSE\r
 \r
 \r
                    GNU GENERAL PUBLIC LICENSE\r
index aeca28735c9913d0418a62cf69f9ae731a2294c9..bd98d5409eb2abb29727164e64fad1b747cd014a 100644 (file)
@@ -91,7 +91,15 @@ task.h is included from an application file. */
 #define configADJUSTED_HEAP_SIZE       ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )\r
 \r
 /* Allocate the memory for the heap. */\r
 #define configADJUSTED_HEAP_SIZE       ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )\r
 \r
 /* Allocate the memory for the heap. */\r
-static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];\r
+/* Allocate the memory for the heap. */\r
+#if( configAPPLICATION_ALLOCATED_HEAP == 1 )\r
+       /* The application writer has already defined the array used for the RTOS\r
+       heap - probably so it can be placed in a special segment or address. */\r
+       extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];\r
+#else\r
+       static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];\r
+#endif /* configAPPLICATION_ALLOCATED_HEAP */\r
+\r
 static size_t xNextFreeByte = ( size_t ) 0;\r
 \r
 /*-----------------------------------------------------------*/\r
 static size_t xNextFreeByte = ( size_t ) 0;\r
 \r
 /*-----------------------------------------------------------*/\r
@@ -102,12 +110,14 @@ void *pvReturn = NULL;
 static uint8_t *pucAlignedHeap = NULL;\r
 \r
        /* Ensure that blocks are always aligned to the required number of bytes. */\r
 static uint8_t *pucAlignedHeap = NULL;\r
 \r
        /* Ensure that blocks are always aligned to the required number of bytes. */\r
-       #if portBYTE_ALIGNMENT != 1\r
+       #if( portBYTE_ALIGNMENT != 1 )\r
+       {\r
                if( xWantedSize & portBYTE_ALIGNMENT_MASK )\r
                {\r
                        /* Byte alignment required. */\r
                        xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );\r
                }\r
                if( xWantedSize & portBYTE_ALIGNMENT_MASK )\r
                {\r
                        /* Byte alignment required. */\r
                        xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );\r
                }\r
+       }\r
        #endif\r
 \r
        vTaskSuspendAll();\r
        #endif\r
 \r
        vTaskSuspendAll();\r
index 2e7aa19c835be378f8c846e4c1f3f68ef87e3e53..2d95e441154cdb33bbcbbcdfda0c7af7f7bd4d04 100644 (file)
@@ -97,7 +97,14 @@ task.h is included from an application file. */
 static void prvHeapInit( void );\r
 \r
 /* Allocate the memory for the heap. */\r
 static void prvHeapInit( void );\r
 \r
 /* Allocate the memory for the heap. */\r
-static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];\r
+#if( configAPPLICATION_ALLOCATED_HEAP == 1 )\r
+       /* The application writer has already defined the array used for the RTOS\r
+       heap - probably so it can be placed in a special segment or address. */\r
+       extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];\r
+#else\r
+       static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];\r
+#endif /* configAPPLICATION_ALLOCATED_HEAP */\r
+\r
 \r
 /* Define the linked list structure.  This is used to link free blocks in order\r
 of their size. */\r
 \r
 /* Define the linked list structure.  This is used to link free blocks in order\r
 of their size. */\r
@@ -127,7 +134,7 @@ static size_t xFreeBytesRemaining = configADJUSTED_HEAP_SIZE;
  */\r
 #define prvInsertBlockIntoFreeList( pxBlockToInsert )                                                          \\r
 {                                                                                                                                                                      \\r
  */\r
 #define prvInsertBlockIntoFreeList( pxBlockToInsert )                                                          \\r
 {                                                                                                                                                                      \\r
-BlockLink_t *pxIterator;                                                                                                                               \\r
+BlockLink_t *pxIterator;                                                                                                                       \\r
 size_t xBlockSize;                                                                                                                                     \\r
                                                                                                                                                                        \\r
        xBlockSize = pxBlockToInsert->xBlockSize;                                                                               \\r
 size_t xBlockSize;                                                                                                                                     \\r
                                                                                                                                                                        \\r
        xBlockSize = pxBlockToInsert->xBlockSize;                                                                               \\r