annotate src/cs/system/template/gsm_ds_motc155.template @ 216:2be687f4476c default tip

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