5 "libcr_newlib_semihost.a"
\r
10 /* Define each memory region. */
\r
11 PROGRAM_FLASH (rx) : ORIGIN = 0x10000000, LENGTH = 0xfe00 /* 63.5K bytes (alias Flash). */
\r
12 SG_veneer_table (rx): ORIGIN = 0x1000fe00, LENGTH = 0x200 /* 0.5K bytes (alias Flash2). */
\r
13 Ram0 (rwx) : ORIGIN = 0x30000000, LENGTH = 0x8000 /* 32K bytes (alias RAM). */
\r
16 /* Define a symbol for the top of each memory region. */
\r
17 __base_PROGRAM_FLASH = 0x10000000; /* PROGRAM_FLASH. */
\r
18 __base_Flash = 0x10000000; /* Flash. */
\r
19 __top_PROGRAM_FLASH = 0x10000000 + 0xfe00; /* 63.5K bytes */
\r
20 __top_Flash = 0x10000000 + 0xfe00; /* 63.5K bytes */
\r
22 __base_SG_veneer_table = 0x1000fe00; /* SG_veneer_table. */
\r
23 __base_Flash2 = 0x1000fe00; /* Flash2. */
\r
24 __top_SG_veneer_table = 0x1000fe00 + 0x200; /* 0.5K bytes. */
\r
25 __top_Flash2 = 0x1000fe00 + 0x200; /* 0.5K bytes. */
\r
27 __base_Ram0 = 0x30000000; /* Ram0. */
\r
28 __base_RAM = 0x30000000; /* RAM. */
\r
29 __top_Ram0 = 0x30000000 + 0x8000; /* 32K bytes. */
\r
30 __top_RAM = 0x30000000 + 0x8000; /* 32K bytes. */
\r
37 /* Place TrustZone Secure Gateway Stubs Section in SG_veneer_table'
\r
38 * (Non-Secure Callable) memory. */
\r
39 .gnu.sgstubs : ALIGN (32)
\r
48 /* Veneer Table Section (Non-Secure Callable). */
\r
49 .text_Flash2 : ALIGN(4)
\r
52 *(.text_Flash2) /* For compatibility with previous releases. */
\r
53 *(.text_SG_veneer_table) /* For compatibility with previous releases. */
\r
55 *(.text.$SG_veneer_table)
\r
56 *(.text_Flash2.*) /* For compatibility with previous releases. */
\r
57 *(.text_SG_veneer_table.*) /* For compatibility with previous releases. */
\r
59 *(.text.$SG_veneer_table.*)
\r
61 *(.rodata.$SG_veneer_table)
\r
62 *(.rodata.$Flash2.*)
\r
63 *(.rodata.$SG_veneer_table.*)
\r
66 /* Vector Table Section. */
\r
70 __vectors_start__ = ABSOLUTE(.);
\r
71 KEEP(*(.isr_vector))
\r
73 /* Global Section Table. */
\r
75 __section_table_start = .;
\r
77 __data_section_table = .;
\r
78 LONG(LOADADDR(.data));
\r
80 LONG( SIZEOF(.data));
\r
81 __data_section_table_end = .;
\r
83 __bss_section_table = .;
\r
85 LONG( SIZEOF(.bss));
\r
86 __bss_section_table_end = .;
\r
88 __section_table_end = .;
\r
89 /* End of Global Section Table. */
\r
94 /* Main Text Section. */
\r
98 *(.rodata .rodata.* .constdata .constdata.*)
\r
102 /* For exception handling/unwind - some Newlib functions (in common
\r
103 * with C++ and STDC++) use this. */
\r
104 .ARM.extab : ALIGN(4)
\r
106 *(.ARM.extab* .gnu.linkonce.armextab.*)
\r
109 .ARM.exidx : ALIGN(4)
\r
112 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
\r
116 /* Text Section End. */
\r
119 /* Uninit Reserved Section. */
\r
120 .uninit_RESERVED : ALIGN(4)
\r
122 _start_uninit_RESERVED = .;
\r
123 KEEP(*(.bss.$RESERVED*))
\r
125 _end_uninit_RESERVED = .;
\r
128 /* Main Data section (Ram0). */
\r
133 PROVIDE(__start_data_RAM = .);
\r
134 PROVIDE(__start_data_Ram0 = .);
\r
140 PROVIDE(__end_data_RAM = .);
\r
141 PROVIDE(__end_data_Ram0 = .);
\r
142 } > Ram0 AT>PROGRAM_FLASH
\r
144 /* Main BSS Section. */
\r
148 PROVIDE(__start_bss_RAM = .);
\r
149 PROVIDE(__start_bss_Ram0 = .);
\r
154 PROVIDE(__end_bss_RAM = .);
\r
155 PROVIDE(__end_bss_Ram0 = .);
\r
159 /* Default Noinit Section. */
\r
160 .noinit (NOLOAD) : ALIGN(4)
\r
163 PROVIDE(__start_noinit_RAM = .);
\r
164 PROVIDE(__start_noinit_Ram0 = .);
\r
168 PROVIDE(__end_noinit_RAM = .);
\r
169 PROVIDE(__end_noinit_Ram0 = .);
\r
172 /* Reserve space and place heap in memory map. */
\r
182 /* Reserve space for stack in memory. */
\r
183 _StackSize = 0x800;
\r
189 /* Place actual stack in memory map. */
\r
190 .stack ORIGIN(Ram0) + LENGTH(Ram0) - _StackSize - 0 : ALIGN(4)
\r
194 _vStackTop = . + _StackSize;
\r
197 /* Create checksum value (used in startup). */
\r
198 PROVIDE(__valid_user_code_checksum = 0 -
\r
201 + (NMI_Handler + 1)
\r
202 + (HardFault_Handler + 1)
\r
203 + (( DEFINED(MemManage_Handler) ? MemManage_Handler : 0 ) + 1) /* MemManage_Handler may not be defined. */
\r
204 + (( DEFINED(BusFault_Handler) ? BusFault_Handler : 0 ) + 1) /* BusFault_Handler may not be defined. */
\r
205 + (( DEFINED(UsageFault_Handler) ? UsageFault_Handler : 0 ) + 1) /* UsageFault_Handler may not be defined. */
\r
208 /* Provide basic symbols giving location and size of main text block,
\r
209 * including initial values of RW data sections. Note that these will need
\r
210 * extending to give a complete picture with complex images
\r
211 * (e.g multiple Flash banks). */
\r
212 _image_start = LOADADDR(.text);
\r
213 _image_end = LOADADDR(.data) + SIZEOF(.data);
\r
214 _image_size = _image_end - _image_start;
\r