annotate Common/CPU1-F429.ld @ 38:5f11787b4f42

include in ostc4 repository
author heinrichsweikamp
date Sat, 28 Apr 2018 11:52:34 +0200
parents
children c42c82f73c96
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /*****************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 * -*- coding: UTF-8 -*-
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * \file Common/CPU1-F429.ld
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * \brief Linker Script for CPU1 alias Discovery
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * \author Ac6 workbench, Heinrichs Weikamp, and JD Gascuel
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * \date 2018
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * \details
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 * Linker script for STM32F429IIT6 Device from STM32F4 series
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * - 192Kbytes RAM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 * - 2048Kbytes ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * Set heap size, stack size and stack location according
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * to application requirements.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * Set memory bank area and size if external memory is used.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * $Id$
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 *****************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 * This program is free software: you can redistribute it and/or modify
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * it under the terms of the GNU General Public License as published by
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * the Free Software Foundation, either version 3 of the License, or
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * (at your option) any later version.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * This program is distributed in the hope that it will be useful,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * GNU General Public License for more details.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * You should have received a copy of the GNU General Public License
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 * along with this program. If not, see <http://www.gnu.org/licenses/>.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 *****************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 * HISTORY
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 * 2017-12-18 jDG: Mix between std AC6 file and chw stm32f429zi_flash.ld settings.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 /* Entry Point */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 ENTRY(Reset_Handler)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 OUTPUT_ARCH(arm)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 SEARCH_DIR(.)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 /****************************************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 /***************************** Memory Definition ****************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 MEMORY
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 ROM (rx) : ORIGIN = 0x08000000, LENGTH = 0x100000 /* 1024K */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 UPPER(rx) : ORIGIN = 0x08100000, LENGTH = 0x100000 /* 1024K */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 CCRAM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 /* Make sure ROM and UPPER are contiguous, and map 2MB */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 ASSERT( ORIGIN(UPPER) - ORIGIN(ROM) == LENGTH(ROM), "ROM lower and upper region shall be continuous" )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 ASSERT( LENGTH(ROM) + LENGTH(UPPER) == 2048K, "ROM lower + upper regions = 2MB" )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 /* Highest address of the user mode stack */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 _estack = ORIGIN(RAM) + LENGTH(RAM);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 /* Used by the startup to initialize data */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 _sidata = LOADADDR(.data);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 _Min_Heap_Size = 0; /* no required heap (malloc'ed space) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 _Min_Stack_Size = 0x8000; /* required 32K of stack */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 /* Linker script to place sections and symbol values. Should be used together
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 * with other linker script that defines memory regions FLASH and RAM.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 * It references following symbols, which must be defined in code:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 * Reset_Handler : Entry of reset handler
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 * It defines following symbols, which code can use without definition:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 * __exidx_start
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 * __exidx_end
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 * __preinit_array_start
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 * __preinit_array_end
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 * __init_array_start
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 * __init_array_end
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 * __fini_array_start
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 * __fini_array_end
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 * _sbss
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 * __bss_start__
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 * _ebss
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 * __bss_end__
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 * _edata
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 * end
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 * _end
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 * _estack
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 /****************************************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 /*************************** Code and Data Sections *************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 SECTIONS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 /******************* NVIC reset and interupt vectors **********************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 .isr_vector 0x08000000 :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 KEEP( *(.isr_vector) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 /************* The program code and other data into ROM memory ************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 .text :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 *(.text) /* .text sections (code) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 *(.text*) /* .text* sections (code) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 *(.glue_7) /* glue arm to thumb code */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 *(.glue_7t) /* glue thumb to arm code */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 *(.eh_frame)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 _etext = .; /* define a global symbols at end of code */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 .preinit_array :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 PROVIDE_HIDDEN( __preinit_array_start = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 KEEP( *(.preinit_array*) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 PROVIDE_HIDDEN( __preinit_array_end = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 .init_array :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 PROVIDE_HIDDEN( __init_array_start = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 KEEP( *(SORT(.init_array.*)) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 KEEP( *(.init_array*) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 PROVIDE_HIDDEN( __init_array_end = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 .fini_array :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 PROVIDE_HIDDEN( __fini_array_start = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 KEEP( *(SORT(.fini_array.*)) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 KEEP( *(.fini_array*) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 PROVIDE_HIDDEN( __fini_array_end = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 /********************** Constant data into ROM memory *********************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 .rodata :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 *(.rodata) /* .rodata sections (constants, strings, etc.) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 .ARM.extab : {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 *(.ARM.extab* .gnu.linkonce.armextab.*)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 .ARM : {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 __exidx_start = .;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 *(.ARM.exidx*)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 __exidx_end = .;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 /************* Data and Structures at absolute address in ROM *************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 /* FIXME: this sets the SFirmwareData structure, not the code ... */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 .bootloader_firmware_data 0x0800A000 : {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 PROVIDE( bootloader_FirmwareData = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 KEEP( *(.bootloader_firmware_data) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 } > ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 /* FIMXE: original address was 0x08050000. But we have a collision */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 .firmware_FirmwareData 0x08060000 : {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 PROVIDE( firmware_FirmwareData = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 KEEP( *(.firmware_firmware_data) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 } >ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 .font_firmware_data 0x08132000 : {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 PROVIDE( font_FirmwareData = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 KEEP( *(.font_firmware_data) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 } >UPPER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 /* Put fonts and images in UPPER region */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 .upper_fonts : {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 __upper_font_data = .;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 KEEP( *(.upper_fonts) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 __upper_font_data_end = .;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 } >UPPER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 .upper_font_directory 0x081E0000 : { /* Last 128 KBytes of UPPER ROM */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 /* Define Known Address for Each Font */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 __font_directory = .;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 PROVIDE( Awe48 = __font_directory + 0 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 PROVIDE( FontT24 = __font_directory + 1 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 PROVIDE( FontT42 = __font_directory + 2 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 PROVIDE( FontT48 = __font_directory + 3 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 PROVIDE( FontT54 = __font_directory + 4 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 PROVIDE( FontT84 = __font_directory + 5 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 PROVIDE( FontT105 = __font_directory + 6 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 PROVIDE( FontT144 = __font_directory + 7 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 PROVIDE( Batt24 = __font_directory + 8 * 0xc );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 __font_directory_end = __font_directory + 9 * 0xc;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 KEEP( *(.upper_font_directory) )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 LONG( -1 ); /* Magic End Marker */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 /* and for Each Image */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 __image_directory = .;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 PROVIDE( ImgHWcolor = __image_directory + 0 * 8 );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 PROVIDE( ImgOSTC = __image_directory + 1 * 8 );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 __image_directory_end = __image_directory + 2 * 8;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 /* FIXME: shall KEEP images here */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 LONG( -1 ); /* Magic End Marker */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 /* and for CLUT */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 PROVIDE( indexHWcolor = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 . += 0x400;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 LONG( -1 ); /* Magic End Marker */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 } >UPPER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 /************ Initialized Data Sections into RAM & ROM Memory **************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 .data :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 _sdata = .; /* create a global symbol at data start */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 *(.data) /* .data sections */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 *(.data*) /* .data* sections */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 *(vtable)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 _edata = .; /* define a global symbol at data end */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 } >RAM AT>ROM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 /*************** Uninitialized Data Section into RAM Memory ****************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 .bss :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 /* This is used by the startup in order to initialize the .bss secion */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 _sbss = .; /* define a global symbol at bss start */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 __bss_start__ = _sbss;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 *(.bss)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 *(.bss*)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 *(COMMON)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 . = ALIGN(4);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 _ebss = .; /* define a global symbol at bss end */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 __bss_end__ = _ebss;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 } >RAM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 /********************** User_heap_stack section ****************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 /* just to check that there is enough RAM left */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 ._user_heap_stack :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 . = ALIGN(8);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 PROVIDE ( end = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 PROVIDE ( _end = . );
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 . = . + _Min_Heap_Size;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 . = . + _Min_Stack_Size;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 . = ALIGN(8);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 } >RAM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 /* Remove information from the compiler libraries */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 /DISCARD/ :
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 libc.a ( * )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 libm.a ( * )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 libgcc.a ( * )
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 .ARM.attributes 0 : { *(.ARM.attributes) }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 }