]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_Simulator_Keil_GCC/GCC_Specific/sections.ld
Increase the test coverage of the GCC MPU demo that runs in the Keil simulator.
[freertos] / FreeRTOS / Demo / CORTEX_MPU_Simulator_Keil_GCC / GCC_Specific / sections.ld
index c7515cb470941460f93c742f17a44d18ff2acf0a..b3c41d0cf5d848d46cbede5c3efa402818038a83 100644 (file)
@@ -5,25 +5,9 @@ MEMORY
   RAM (rw)         : ORIGIN = 0x20000000, LENGTH = 0x8000\r
 }\r
 \r
-/* Variables required by FreeRTOS MPU. */\r
-_Privileged_Functions_Region_Size = 16K;\r
-_Privileged_Data_Region_Size = 256;\r
-\r
-__FLASH_segment_start__ = ORIGIN( ROM );\r
-__FLASH_segment_end__ = __FLASH_segment_start__ + LENGTH( ROM );\r
-\r
-__privileged_functions_start__ = ORIGIN( ROM );\r
-__privileged_functions_end__ = __privileged_functions_start__ + _Privileged_Functions_Region_Size;\r
-\r
-__SRAM_segment_start__ = ORIGIN( RAM );\r
-__SRAM_segment_end__ = __SRAM_segment_start__ + LENGTH( RAM );\r
-\r
-__privileged_data_start__ = ORIGIN( RAM );\r
-__privileged_data_end__ = ORIGIN( RAM ) + _Privileged_Data_Region_Size;\r
-\r
 /* Variables used by FreeRTOS-MPU. */\r
-_Privileged_Functions_Region_Size = 16K;\r
-_Privileged_Data_Region_Size = 256;\r
+_Privileged_Functions_Region_Size = 32K;\r
+_Privileged_Data_Region_Size = 512;\r
 \r
 __FLASH_segment_start__ = ORIGIN( ROM );\r
 __FLASH_segment_end__ = __FLASH_segment_start__ + LENGTH( ROM );\r
@@ -41,11 +25,7 @@ __privileged_data_end__ = ORIGIN( RAM ) + _Privileged_Data_Region_Size;
 /*\r
  * The '__stack' definition is required by crt0, do not remove it.\r
  */\r
-/* Place top of stack immediate before ROM Log\r
- *__stack = ORIGIN(RAM) + LENGTH(RAM);\r
- */\r
 __stack = ORIGIN(RAM) + LENGTH(RAM);\r
-\r
 _estack = __stack;\r
 \r
 /*\r
@@ -67,7 +47,7 @@ PROVIDE ( _Main_Stack_Limit = __Main_Stack_Limit ) ;
  * There will be a link error if there is not this amount of\r
  * RAM free at the end.\r
  */\r
-_Minimum_Stack_Size = 256 ;\r
+_Minimum_Stack_Size = 1024 ;\r
 \r
 /*\r
  * Default heap definitions.\r
@@ -98,15 +78,16 @@ SECTIONS
         KEEP(*(.isr_vector))\r
         *(privileged_functions)\r
         . = ALIGN(4);\r
+\r
+        /* Non privileged code is after _Privileged_Functions_Region_Size. */\r
+        __privileged_functions_actual_end__ = .;\r
+        . = _Privileged_Functions_Region_Size;\r
     } > ROM\r
 \r
 \r
 \r
     .text :\r
     {\r
-        /* Non privileged code kept out of the first 16K or flash. */\r
-        . = __privileged_functions_start__ + _Privileged_Functions_Region_Size;\r
-\r
         . = ALIGN(4);\r
 \r
 \r
@@ -238,11 +219,12 @@ SECTIONS
     privileged_data :\r
     {\r
         *(privileged_data)\r
-        /* Non kernel data is kept out of the first 256 bytes of SRAM. */\r
+        /* Non kernel data is kept out of the first _Privileged_Data_Region_Size\r
+        bytes of SRAM. */\r
+        __privileged_data_actual_end__ = .;\r
+        . = _Privileged_Data_Region_Size;\r
     } > RAM\r
 \r
-    . = ORIGIN( RAM ) + _Privileged_Data_Region_Size;\r
-\r
     /*\r
      * The initialised data section.\r
      * The program executes knowing that the data is in the RAM\r
@@ -324,81 +306,6 @@ SECTIONS
         . = ALIGN(4);\r
     } >RAM\r
 \r
-    ._check_rom_log :\r
-    {\r
-        . = ALIGN(4);\r
-\r
-/*        . = . + __ROM_Log_Size ; */\r
-\r
-        . = ALIGN(4);\r
-    } >RAM\r
-\r
-/*\r
-    .bss_CCMRAM : ALIGN(4)\r
-    {\r
-        *(.bss.CCMRAM .bss.CCMRAM.*)\r
-    } > CCMRAM\r
-*/\r
-    /*\r
-     * The ROM Bank1.\r
-     * The C or assembly source must explicitly place the code\r
-     * or data there using the "section" attribute.\r
-     */\r
-\r
-\r
-    /* remaining code */\r
-    /* read-only data (constants) */\r
-/*\r
-    .b1text :\r
-    {\r
-        *(.b1text)\r
-        *(.b1rodata)\r
-        *(.b1rodata.*)\r
-    } >ROMB1\r
-*/\r
-    /*\r
-     * The EXTMEM.\r
-     * The C or assembly source must explicitly place the code or data there\r
-     * using the "section" attribute.\r
-     */\r
-\r
-    /* EXTMEM Bank0 */\r
-/*\r
-    .eb0text :\r
-    {\r
-        *(.eb0text)\r
-        *(.eb0rodata)\r
-        *(.eb0rodata.*)\r
-    } >EXTMEMB0\r
-*/\r
-    /* EXTMEM Bank1 */\r
-/*\r
-    .eb1text :\r
-    {\r
-        *(.eb1text)\r
-        *(.eb1rodata)\r
-        *(.eb1rodata.*)\r
-    } >EXTMEMB1\r
-*/\r
-    /* EXTMEM Bank2 */\r
-/*\r
-    .eb2text :\r
-    {\r
-        *(.eb2text)\r
-        *(.eb2rodata)\r
-        *(.eb2rodata.*)\r
-    } >EXTMEMB2\r
-*/\r
-    /* EXTMEM Bank0 */\r
-/*\r
-    .eb3text :\r
-    {\r
-        *(.eb3text)\r
-        *(.eb3rodata)\r
-        *(.eb3rodata.*)\r
-    } >EXTMEMB3\r
-*/\r
-\r
     /* After that there are only debugging sections. */\r
 \r
     /* This can remove the debugging information from the standard libraries */\r