annotate src/cs/system/template/gsm_ds_amd8_compact.template @ 192:4f40ae165be4

abb.c & init.c: sync with Magnetite for Luna additions These Luna target-specific additions are conditionalized on CONFIG_TARGET_LUNA, a C preprocessor symbol that will never be defined in Selenite, hence this change has exactly zero impact on FC Selenite. However, they are being pulled in as a sync in order to keep the diff between Magnetite and Selenite to a minimum; keeping this diff to a minimum increases our opportunities for possible evolution of future FC firmwares.
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 23 May 2020 07:03:46 +0000
parents 2a9935250c95
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
179
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * Integrated Protocol Stack Linker command file (all components)
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * Target : ARM
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 *
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * Copyright (c) Texas Instruments 2002, Condat 2002
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 *
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 -c /* Autoinitialize variables at runtime */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 /*********************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 /* SPECIFY THE SYSTEM MEMORY MAP */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 /*********************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 MEMORY
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 /* CS0: Flash 8 Mbytes ****************************************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 /* Interrupt Vectors Table */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 I_MEM (RXI) : org = 0x00000000 len = 0x00000100
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 /* Boot Sector */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 B_MEM (RXI) : org = 0x00000100 len = 0x00001f00
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 /* Magic Word for Calypso Boot ROM */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 MWC_MEM (RXI) : org = 0x00002000 len = 0x00000004 fill = 0x0000001
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 /* Program Memory */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 P_MEM1 (RXI) : org = 0x00004000 len = 0x00000700
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 P_MEM2 (RXI) : org = 0x00004700 len = 0x00000004
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 P_MEM3 (RXI) : org = 0x00004704 len = 0x00400000
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 /* FFS Area */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 FFS_MEM (RX) : org = 0x01800000 len = 0x00200000
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 /**************************************************************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 /* CS1: External SRAM 1 Mbytes ********************************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 /* Data Memory */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 * FreeCalypso: we try to support several different Leonardo board
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 * variants with different flash and XRAM sizes. In this template
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 * we are going to define two XRAM regions of 1 MiB each.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 D_MEM1 (RW) : org = 0x01000000 len = 0x00100000
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 D_MEM2 (RW) : org = 0x01100000 len = 0x00100000
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 /**************************************************************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 /* CS6: Calypso Internal SRAM 512 kbytes **********************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 /* Code & Variables Memory */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 S_MEM (RXW) : org = 0x00800000 len = 0x00080000
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 /**************************************************************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 /***********************************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 /***********************************************/
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 * Since the bootloader directly calls the INT_Initialize() routine located
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 * in int.s, this int.s code must always be mapped at the same address
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 * (usually in the second flash sector). Its length is about 0x500 bytes.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 * Then comes the code that need to be loaded into the internal RAM.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 SECTIONS
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 .intvecs : {} > I_MEM /* Interrupt Vectors Table */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 .monitor : > B_MEM /* Monitor Constants & Code */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 $(CONST_BOOT_LIB)
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 .inttext : {} > P_MEM1 /* int.s Code */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 .bss_dar : > D_MEM1 /* DAR SWE Variables */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 $(BSS_DAR_LIB)
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 * The .bss section should not be split to ensure it is initialized to 0
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 * each time the SW is reset. So the whole .bss is mapped either in D_MEM1
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 * or in D_MEM2.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 .bss : > D_MEM1 | D_MEM2 /* Global & Static Variables */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 $(BSS_BOOT_LIB)
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 * All .bss sections, which must be mapped in internal RAM must be
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 * grouped in order to initialized the corresponding memory to 0.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 * This initialization is done in int.s file before calling the Nucleus
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 * routine.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 GROUP
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 S_D_Mem /* Label of start address of .bss section in Int. RAM */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 .DintMem
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 * .bss sections of the application
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 $(BSS_LIBS)
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 API_HISR_stack : {}
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 E_D_Mem /* Label of end address of .bss section in Int. RAM */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 } > S_MEM
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 * .text and .const sections which must be mapped in internal RAM.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 .ldfl : {} > P_MEM2 /* Used to know the start load address */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 GROUP load = P_MEM3, run = S_MEM
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 S_P_Mem /* Label of start address of .text & .const sections in Int. RAM */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 .PIntMem
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 * .text and .const sections of the application.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 *
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 * The .veneer sections correspond exactly to .text:v&n sections
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 * implementing the veneer functions. The .text:v$n -> .veneer
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 * translation is performed by PTOOL software when PTOOL_OPTIONS
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 * environement variable is set to veneer_section.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 $(CONST_LIBS)
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 E_P_Mem /* Label of end address of .text and .const sections in Int. RAM */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 * The rest of the code is mapped in flash, however the trampolines
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 * load address should be consistent with .text.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 COMMENT2START
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 `trampolines load = P_MEM3, run = S_MEM
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 COMMENT2END
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 .text : {} > P_MEM3 /* Code */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 /*
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 * The rest of the constants is mapped in flash.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 * The .cinit section should not be split.
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 .cinit : {} > P_MEM3 /* Initialization Tables */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 .const : {} > P_MEM3 /* Constant Data */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 KadaAPI : {} > P_MEM3 /* ROMized CLDC */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 .javastack: {} >> D_MEM1 | D_MEM2 /* Java stack */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 .stackandheap : > D_MEM1 /* System Stacks, etc... */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 {
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 /* Leave 20 32bit words for register pushes. */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 . = align(8);
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 . += 20 * 4;
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 /* Stack for abort and/or undefined modes. */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 exception_stack = .;
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 /* Leave 38 32bit words for state saving on exceptions. */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 _xdump_buffer = .;
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 . += 38 * 4;
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 . = align(8);
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 /* Beginning of stacks and heap area - 2.75 kbytes (int.s) */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 stack_segment = .;
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 . += 0xB00;
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 }
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 .data : {} > D_MEM1 /* Initialized Data */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 .sysmem : {} > D_MEM1 /* Dynamic Memory Allocation Area */
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
2a9935250c95 src/cs: sync with Magnetite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 }