-\r
-; Privileged Code:\r
-; Start : 0x10040000\r
-; End : 0x10047000 - 1\r
-; Size : 28 Kbytes\r
+; NOTE: ARMv8-M MPU requires that each region must start on a 32 byte aligned\r
+; address and the size of a region must be a multiple of 32 bytes.\r
+;\r
+; Flash Layout\r
+;\r
+; ---------------------\r
+; | Privileged Code |\r
+; ---------------------\r
+; | System Calls |\r
+; ---------------------\r
+; | Unprivileged Code |\r
+; ---------------------\r
+;\r
+; RAM Layout\r
;\r
-; Privileged Data:\r
-; Start : 0x30008000\r
-; End : 0x30009000 - 1\r
-; Size : 4 Kbytes\r
-LR_IROM_NS_PRIVILEGED 0x10040000 0x00007000 ; load region size_region\r
+; ---------------------\r
+; | Privileged Data |\r
+; ---------------------\r
+; | Unprivileged Data |\r
+; ---------------------\r
+\r
+LR_APP 0x10040000 ; load region\r
{\r
- ER_IROM_NS_PRIVILEGED +0 ; load address = execution address\r
+ ER_IROM_NS_PRIVILEGED +0 ALIGN 32\r
{\r
*.o(RESET, +First)\r
*(InRoot$$Sections) ; All sections that must be in a root region\r
*(privileged_functions)\r
}\r
\r
- ER_IRAM_NS_PRIVILEGED 0x30008000 0x00001000\r
+ ER_IROM_NS_PRIVILEGED_ALIGN +0 ALIGN 32 EMPTY 0x0\r
{\r
- *(privileged_data)\r
}\r
-}\r
\r
-; System Calls:\r
-; Start : 0x10047000\r
-; End : 0x10048000 - 1\r
-; Size : 4 Kbytes\r
-LR_IROM_NS_SYSTEM_CALLS 0x10047000 0x00001000 ; load region size_region\r
-{\r
- ER_IROM_NS_SYSTEM_CALLS +0 ; load address = execution address\r
+ ER_IROM_NS_FREERTOS_SYSTEM_CALLS +0 ALIGN 32\r
{\r
- *(freertos_system_calls)\r
+ *(freertos_system_calls)\r
}\r
-}\r
\r
-; Unprivileged Code:\r
-; Start : 0x10048000\r
-; End : 0x10080000 - 1\r
-; Size : 224 Kbytes\r
-;\r
-; Unprivileged Data:\r
-; Start : 0x30009000\r
-; End : 0x30018000 - 1\r
-; Size : 60 Kbytes\r
-LR_IROM_NS_UNPRIVILEGED 0x10048000 0x00038000 ; load region size_region\r
-{\r
- ER_IROM_NS_UNPRIVILEGED +0 ; load address = execution address\r
+ ER_IROM_NS_FREERTOS_SYSTEM_CALLS_ALIGN +0 ALIGN 32 EMPTY 0x0\r
+ {\r
+ }\r
+\r
+ ER_IROM_NS_UNPRIVILEGED +0 ALIGN 32\r
{\r
- *(+RO)\r
+ *(+RO)\r
}\r
\r
- ER_IRAM_NS_UNPRIVILEGED 0x30009000 0x0000F000\r
+ ER_IROM_NS_UNPRIVILEGED_ALIGN +0 ALIGN 32 EMPTY 0x0\r
+ {\r
+ }\r
+\r
+ ER_IRAM_NS_PRIVILEGED 0x30008000 ALIGN 32\r
+ {\r
+ *(privileged_data)\r
+ }\r
+\r
+ ER_IRAM_NS_PRIVILEGED_ALIGN +0 ALIGN 32 EMPTY 0x0\r
+ {\r
+ }\r
+\r
+ ER_IRAM_NS_UNPRIVILEGED +0 ALIGN 32\r
{\r
*(+RW, +ZI)\r
}\r
-}\r
\r
+ ER_IRAM_NS_UNPRIVILEGED_ALIGN +0 ALIGN 32 EMPTY 0x0\r
+ {\r
+ }\r
+}\r
#include "tz_demo.h"\r
#include "mpu_demo.h"\r
\r
-/* Externs needed by the MPU setup code. These must match the memory map as\r
- * specified in Scatter-Loading description file (FreeRTOSDemo_ns.sct). */\r
+/* Externs needed by the MPU setup code. These are defined in Scatter-Loading\r
+ * description file (FreeRTOSDemo_ns.sct). */\r
+extern uint32_t Image$$ER_IROM_NS_PRIVILEGED$$Base;\r
+extern uint32_t Image$$ER_IROM_NS_PRIVILEGED_ALIGN$$Limit;\r
+extern uint32_t Image$$ER_IROM_NS_FREERTOS_SYSTEM_CALLS$$Base;\r
+extern uint32_t Image$$ER_IROM_NS_FREERTOS_SYSTEM_CALLS_ALIGN$$Limit;\r
+extern uint32_t Image$$ER_IROM_NS_UNPRIVILEGED$$Base;\r
+extern uint32_t Image$$ER_IROM_NS_UNPRIVILEGED_ALIGN$$Limit;\r
+\r
+extern uint32_t Image$$ER_IRAM_NS_PRIVILEGED$$Base;\r
+extern uint32_t Image$$ER_IRAM_NS_PRIVILEGED_ALIGN$$Limit;\r
+extern uint32_t Image$$ER_IRAM_NS_UNPRIVILEGED$$Base;\r
+extern uint32_t Image$$ER_IRAM_NS_UNPRIVILEGED_ALIGN$$Limit;\r
+\r
/* Privileged flash. */\r
-const uint32_t * __privileged_functions_start__ = ( uint32_t * ) ( 0x10040000 );\r
-const uint32_t * __privileged_functions_end__ = ( uint32_t * ) ( 0x10047000 - 0x1 ); /* Last address in privileged Flash region. */\r
+const uint32_t * __privileged_functions_start__ = ( uint32_t * ) &( Image$$ER_IROM_NS_PRIVILEGED$$Base );\r
+const uint32_t * __privileged_functions_end__ = ( uint32_t * ) ( ( uint32_t ) &( Image$$ER_IROM_NS_PRIVILEGED_ALIGN$$Limit ) - 0x1 ); /* Last address in privileged Flash region. */\r
\r
-/* Flash containing system calls. Note that the section containing system calls\r
- * is unprivileged so that unprivileged tasks can make system calls.*/\r
-const uint32_t * __syscalls_flash_start__ = ( uint32_t * ) ( 0x10047000 );\r
-const uint32_t * __syscalls_flash_end__ = ( uint32_t * ) ( 0x10048000 - 0x1 ); /* Last address in Flash region containing system calls. */\r
+/* Flash containing system calls. */\r
+const uint32_t * __syscalls_flash_start__ = ( uint32_t * ) &( Image$$ER_IROM_NS_FREERTOS_SYSTEM_CALLS$$Base );\r
+const uint32_t * __syscalls_flash_end__ = ( uint32_t * ) ( ( uint32_t ) &( Image$$ER_IROM_NS_FREERTOS_SYSTEM_CALLS_ALIGN$$Limit ) - 0x1 ); /* Last address in Flash region containing system calls. */\r
\r
-/* Unprivileged flash. */\r
-const uint32_t * __unprivileged_flash_start__ = ( uint32_t * ) ( 0x10048000 );\r
-const uint32_t * __unprivileged_flash_end__ = ( uint32_t * ) ( 0x10080000 - 0x1 ); /* Last address in un-privileged Flash region. */\r
+/* Unprivileged flash. Note that the section containing system calls is\r
+ * unprivileged so that unprivileged tasks can make system calls. */\r
+const uint32_t * __unprivileged_flash_start__ = ( uint32_t * ) &( Image$$ER_IROM_NS_UNPRIVILEGED$$Base );\r
+const uint32_t * __unprivileged_flash_end__ = ( uint32_t * ) ( ( uint32_t ) &( Image$$ER_IROM_NS_UNPRIVILEGED_ALIGN$$Limit ) - 0x1 ); /* Last address in un-privileged Flash region. */\r
\r
-/* Privileged RAM. It contains kernel data. */\r
-const uint32_t * __privileged_sram_start__ = ( uint32_t * ) ( 0x30008000 );\r
-const uint32_t * __privileged_sram_end__ = ( uint32_t * ) ( 0x30009000 - 0x1 ); /* Last address in privileged RAM. */\r
+/* RAM with priviledged access only. This contains kernel data. */\r
+const uint32_t * __privileged_sram_start__ = ( uint32_t * ) &( Image$$ER_IRAM_NS_PRIVILEGED$$Base );\r
+const uint32_t * __privileged_sram_end__ = ( uint32_t * ) ( ( uint32_t ) &( Image$$ER_IRAM_NS_PRIVILEGED_ALIGN$$Limit ) - 0x1 ); /* Last address in privileged RAM. */\r
\r
/* Unprivileged RAM. */\r
-const uint32_t * __unprivileged_sram_start__ = ( uint32_t * ) ( 0x30009000 );\r
-const uint32_t * __unprivileged_sram_end__ = ( uint32_t * ) ( 0x30018000 - 0x1 ); /* Last address in un-privileged RAM. */\r
+const uint32_t * __unprivileged_sram_start__ = ( uint32_t * ) &( Image$$ER_IRAM_NS_UNPRIVILEGED$$Base );\r
+const uint32_t * __unprivileged_sram_end__ = ( uint32_t * ) ( ( uint32_t ) &( Image$$ER_IRAM_NS_UNPRIVILEGED_ALIGN$$Limit ) - 0x1 ); /* Last address in un-privileged RAM. */\r
/*-----------------------------------------------------------*/\r
\r
/**\r
-; *************************************************************\r
-; *** Scatter-Loading Description File generated by uVision ***\r
-; *************************************************************\r
-\r
+; NOTE: ARMv8-M MPU requires that each region must start on a 32 byte aligned\r
+; address and the size of a region must be a multiple of 32 bytes.\r
+;\r
; Flash Layout\r
-; [ ARMv8-M MPU requires that each region must start on a 32 byte aligned\r
-; address and the size of a region must be a multiple of 32 bytes. ]\r
;\r
; ---------------------\r
; | Privileged Code |\r
; ---------------------\r
; | Unprivileged Code |\r
; ---------------------\r
+;\r
+; RAM Layout\r
+;\r
+; ---------------------\r
+; | Privileged Data |\r
+; ---------------------\r
+; | Unprivileged Data |\r
+; ---------------------\r
\r
-LR_CODE 0x00200000 ; load region\r
+LR_APP 0x00200000 ; load region\r
{\r
ER_IROM_NS_PRIVILEGED +0 ALIGN 32\r
{\r
ER_IROM_NS_UNPRIVILEGED_ALIGN +0 ALIGN 32 EMPTY 0x0\r
{\r
}\r
-}\r
-\r
-; RAM Layout\r
-; [ ARMv8-M MPU requires that each region must start on a 32 byte aligned\r
-; address and the size of a region must be a multiple of 32 bytes. ]\r
-;\r
-; ---------------------\r
-; | Privileged Data |\r
-; ---------------------\r
-; | Unprivileged Data |\r
-; ---------------------\r
\r
-LR_DATA 0x20200000 ; load region\r
-{\r
ER_IRAM_NS_PRIVILEGED 0x20200000 ALIGN 32\r
{\r
*(privileged_data)\r
/* RAM with priviledged access only. This contains kernel data. */\r
const uint32_t * __privileged_sram_start__ = ( uint32_t * ) &( Image$$ER_IRAM_NS_PRIVILEGED$$Base );\r
const uint32_t * __privileged_sram_end__ = ( uint32_t * ) ( ( uint32_t ) &( Image$$ER_IRAM_NS_PRIVILEGED_ALIGN$$Limit ) - 0x1 ); /* Last address in privileged RAM. */\r
-;\r
+\r
/* Unprivileged RAM. */\r
const uint32_t * __unprivileged_sram_start__ = ( uint32_t * ) &( Image$$ER_IRAM_NS_UNPRIVILEGED$$Base );\r
const uint32_t * __unprivileged_sram_end__ = ( uint32_t * ) ( ( uint32_t ) &( Image$$ER_IRAM_NS_UNPRIVILEGED_ALIGN$$Limit ) - 0x1 ); /* Last address in un-privileged RAM. */\r