1#! armclang -E --target=arm-arm-none-eabi -mcpu=cortex-a9 -xc
2;**************************************************
3; Copyright (c) 2017 ARM Ltd.  All rights reserved.
4;**************************************************
5
6; Scatter-file for RTX Example on Versatile Express
7
8; This scatter-file places application code, data, stack and heap at suitable addresses in the memory map.
9
10; This platform has 2GB SDRAM starting at 0x80000000.
11
12#include "mem_ARMCA9.h"
13
14SDRAM __ROM_BASE __ROM_SIZE       ; load region size_region
15{
16  VECTORS __ROM_BASE __ROM_SIZE ; load address = execution address
17  {
18      * (RESET, +FIRST)         ; Vector table and other startup code
19      * (InRoot$$Sections)      ; All (library) code that must be in a root region
20      * (+RO-CODE)              ; Application RO code (.text)
21      * (+RO-DATA)              ; Application RO data (.constdata)
22  }
23
24  RW_DATA __RAM_BASE __RW_DATA_SIZE
25  { * (+RW) }                   ; Application RW data (.data)
26
27  ZI_DATA (__RAM_BASE+
28           __RW_DATA_SIZE) __ZI_DATA_SIZE
29  { * (+ZI) }                   ; Application ZI data (.bss)
30
31  ARM_LIB_HEAP  (__RAM_BASE
32                +__RW_DATA_SIZE
33                +__ZI_DATA_SIZE)    EMPTY __HEAP_SIZE        ; Heap region growing up
34  { }
35
36  ARM_LIB_STACK (__RAM_BASE
37                +__RAM_SIZE
38                -__FIQ_STACK_SIZE
39                -__IRQ_STACK_SIZE
40                -__SVC_STACK_SIZE
41                -__ABT_STACK_SIZE
42                -__UND_STACK_SIZE) EMPTY -__STACK_SIZE      ; Stack region growing down
43  { }
44
45  UND_STACK     (__RAM_BASE
46                +__RAM_SIZE
47                -__FIQ_STACK_SIZE
48                -__IRQ_STACK_SIZE
49                -__SVC_STACK_SIZE
50                -__ABT_STACK_SIZE) EMPTY -__UND_STACK_SIZE  ; UND mode stack
51  { }
52
53  ABT_STACK     (__RAM_BASE
54                +__RAM_SIZE
55                -__FIQ_STACK_SIZE
56                -__IRQ_STACK_SIZE
57                -__SVC_STACK_SIZE) EMPTY -__ABT_STACK_SIZE  ; ABT mode stack
58  { }
59
60  SVC_STACK     (__RAM_BASE
61                +__RAM_SIZE
62                -__FIQ_STACK_SIZE
63                -__IRQ_STACK_SIZE) EMPTY -__SVC_STACK_SIZE  ; SVC mode stack
64  { }
65
66  IRQ_STACK     (__RAM_BASE
67                +__RAM_SIZE
68                -__FIQ_STACK_SIZE) EMPTY -__IRQ_STACK_SIZE  ; IRQ mode stack
69  { }
70
71  FIQ_STACK     (__RAM_BASE
72                +__RAM_SIZE)       EMPTY -__FIQ_STACK_SIZE  ; FIQ mode stack
73  { }
74
75  TTB            __TTB_BASE        EMPTY __TTB_SIZE         ; Level-1 Translation Table for MMU
76  { }
77}
78