annotate chipsetsw/system/template/gsm_ds_motc139.template @ 36:bb91c583738d

pdt_2092 links for C139 memory configuration
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Wed, 04 Nov 2015 06:38:18 +0000
parents 3ca834d6a965
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 * Integrated Protocol Stack Linker command file (all components)
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 * Target : ARM
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 * Copyright (c) Texas Instruments 2002, Condat 2002
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 * This version of the linker script template has been concocted
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9 * by Spacefalcon the Outlaw, based on gsm_ds_amd8_lj3.template,
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 * in order to build the GSM firmware for the memory configuration
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 * found in the Motorola C139.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 -c /* Autoinitialize variables at runtime */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 /*********************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 /* SPECIFY THE SYSTEM MEMORY MAP */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 /*********************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 MEMORY
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 /* CS0: Flash 4 Mbytes ****************************************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 /* Interrupt Vectors Table */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 I_MEM (RXI) : org = 0x00000000 len = 0x00000100
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
26 /* Boot Sector */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
27 B_MEM (RXI) : org = 0x00000100 len = 0x00001f00
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
28
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
29 /* Magic Word for Calypso Boot ROM */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
30 MWC_MEM (RXI) : org = 0x00002000 len = 0x00000004 fill = 0x0000001
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
31
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
32 /* Program Memory */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
33 P_MEM1 (RXI) : org = 0x00010000 len = 0x00000700
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
34 P_MEM2 (RXI) : org = 0x00010700 len = 0x00000004
36
bb91c583738d pdt_2092 links for C139 memory configuration
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 20
diff changeset
35 P_MEM3 (RXI) : org = 0x00010704 len = 0x003af8fc
20
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
36
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
37 /* FFS Area */
36
bb91c583738d pdt_2092 links for C139 memory configuration
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 20
diff changeset
38 FFS_MEM (RX) : org = 0x003C0000 len = 0x00030000
20
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
39 /**************************************************************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
40
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
41 /* CS1: External SRAM 1 Mbytes ********************************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42 /* Data Memory */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
43
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
44 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
45 *** HACK by Spacefalcon the Outlaw ***
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
46 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
47 * The starting Leonardo version (gsm_ds_amd8_lj3.template) had two
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
48 * external SRAM regions: D_MEM1 and D_MEM2. When I tried removing
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
49 * D_MEM2 and keeping only D_MEM1, the linker started behaving oddly
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
50 * in that the sections were emitted in the wrong order, and the
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
51 * addresses printed in the map file were bogus. The resulting m0
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
52 * images seemed to still work correctly, but I feel that having the
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
53 * linker act "correctly" is better.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
54 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
55 * My current hack-solution is to split the 1 MiB physical XRAM
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
56 * into D_MEM1 and D_MEM2 of 512 KiB each. As it happens, the total
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
57 * XRAM usage of the current firmware is a little below 512 KiB anyway.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
58 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
59 * Update for C139: we only have 512 KiB in total now, but we can still
36
bb91c583738d pdt_2092 links for C139 memory configuration
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 20
diff changeset
60 * split the last 4 KiB off into D_MEM2.
20
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
61 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
62
36
bb91c583738d pdt_2092 links for C139 memory configuration
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 20
diff changeset
63 D_MEM1 (RW) : org = 0x01000000 len = 0x0007F000
bb91c583738d pdt_2092 links for C139 memory configuration
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents: 20
diff changeset
64 D_MEM2 (RW) : org = 0x0107F000 len = 0x00001000
20
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
65 /**************************************************************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
66
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
67 /* CS6: Calypso Internal SRAM 256 kbytes **********************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
68 /* Code & Variables Memory */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
69 S_MEM (RXW) : org = 0x00800000 len = 0x00040000
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
70 /**************************************************************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
71 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
72
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
73 /***********************************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
74 /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
75 /***********************************************/
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
76
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
77 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
78 * Since the bootloader directly calls the INT_Initialize() routine located
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
79 * in int.s, this int.s code must always be mapped at the same address
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
80 * (usually in the second flash sector). Its length is about 0x500 bytes.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
81 * Then comes the code that need to be loaded into the internal RAM.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
82 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
83
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
84 SECTIONS
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
85 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
86 .intvecs : {} > I_MEM /* Interrupt Vectors Table */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
87 .monitor : > B_MEM /* Monitor Constants & Code */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
88 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
89 $(CONST_BOOT_LIB)
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
90 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
91
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
92 .inttext : {} > P_MEM1 /* int.s Code */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
93
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
94 .bss_dar : > D_MEM1 /* DAR SWE Variables */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
95 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
96 $(BSS_DAR_LIB)
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
97 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
98
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
99 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
100 * The .bss section should not be split to ensure it is initialized to 0
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
101 * each time the SW is reset. So the whole .bss is mapped either in D_MEM1
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
102 * or in D_MEM2.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
103 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
104 * Falcon's note for K5A3281: see the comments above where the memory
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
105 * regions are defined.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
106 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
107
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
108 .bss : > D_MEM1 | D_MEM2 /* Global & Static Variables */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
109 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
110 $(BSS_BOOT_LIB)
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
111 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
112
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
113 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
114 * All .bss sections, which must be mapped in internal RAM must be
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
115 * grouped in order to initialized the corresponding memory to 0.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
116 * This initialization is done in int.s file before calling the Nucleus
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
117 * routine.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
118 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
119
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
120 GROUP
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
121 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
122 S_D_Mem /* Label of start address of .bss section in Int. RAM */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
123 .DintMem
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
124 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
125
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
126 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
127 * .bss sections of the application
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
128 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
129
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
130 $(BSS_LIBS)
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
131
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
132 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
133
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
134 API_HISR_stack : {}
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
135
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
136 E_D_Mem /* Label of end address of .bss section in Int. RAM */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
137 } > S_MEM
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
138
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
139 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
140 * .text and .const sections which must be mapped in internal RAM.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
141 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
142
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
143 .ldfl : {} > P_MEM2 /* Used to know the start load address */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
144 GROUP load = P_MEM3, run = S_MEM
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
145 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
146 S_P_Mem /* Label of start address of .text & .const sections in Int. RAM */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
147 .PIntMem
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
148 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
149 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
150 * .text and .const sections of the application.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
151 *
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
152 * The .veneer sections correspond exactly to .text:v&n sections
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
153 * implementing the veneer functions. The .text:v$n -> .veneer
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
154 * translation is performed by PTOOL software when PTOOL_OPTIONS
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
155 * environement variable is set to veneer_section.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
156 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
157
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
158 $(CONST_LIBS)
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
159
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
160 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
161 E_P_Mem /* Label of end address of .text and .const sections in Int. RAM */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
162 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
163
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
164 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
165 * The rest of the code is mapped in flash, however the trampolines
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
166 * load address should be consistent with .text.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
167 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
168 COMMENT2START
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
169 `trampolines load = P_MEM3, run = S_MEM
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
170 COMMENT2END
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
171
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
172 .text : {} > P_MEM3 /* Code */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
173
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
174 /*
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
175 * The rest of the constants is mapped in flash.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
176 * The .cinit section should not be split.
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
177 */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
178
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
179 .cinit : {} > P_MEM3 /* Initialization Tables */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
180 .const : {} > P_MEM3 /* Constant Data */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
181 KadaAPI : {} > P_MEM3 /* ROMized CLDC */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
182
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
183 .javastack: {} >> D_MEM1 | D_MEM2 /* Java stack */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
184
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
185 .stackandheap : > D_MEM1 /* System Stacks, etc... */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
186 {
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
187 /* Leave 20 32bit words for register pushes. */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
188 . = align(8);
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
189 . += 20 * 4;
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
190
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
191 /* Stack for abort and/or undefined modes. */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
192 exception_stack = .;
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
193
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
194 /* Leave 38 32bit words for state saving on exceptions. */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
195 _xdump_buffer = .;
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
196 . += 38 * 4;
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
197 . = align(8);
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
198
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
199 /* Beginning of stacks and heap area - 2.75 kbytes (int.s) */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
200 stack_segment = .;
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
201 . += 0xB00;
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
202 }
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
203
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
204 .data : {} > D_MEM1 /* Initialized Data */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
205 .sysmem : {} > D_MEM1 /* Dynamic Memory Allocation Area */
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
206
3ca834d6a965 linker script template for c139 target
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
207 }