annotate src/cs/system/template/gsm_ds_pirelli_ram.template @ 576:3cb2ce6e996a

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