5 "libcr_newlib_semihost.a"
\r
10 /* Define each memory region. */
\r
11 PROGRAM_FLASH (rx) : ORIGIN = 0x00010000, LENGTH = 0x72000 /* 456K bytes (alias Flash). */
\r
12 Ram0 (rwx) : ORIGIN = 0x20008000, LENGTH = 0x2b000 /* 172K bytes (alias RAM). */
\r
15 /* Define a symbol for the top of each memory region. */
\r
16 __base_PROGRAM_FLASH = 0x00010000; /* PROGRAM_FLASH. */
\r
17 __base_Flash = 0x00010000; /* Flash. */
\r
18 __top_PROGRAM_FLASH = 0x00010000 + 0x72000; /* 456K bytes. */
\r
19 __top_Flash = 0x00010000 + 0x72000; /* 456K bytes. */
\r
21 __base_Ram0 = 0x20008000; /* Ram0. */
\r
22 __base_RAM = 0x20008000; /* RAM. */
\r
23 __top_Ram0 = 0x20008000 + 0x2b000; /* 172K bytes. */
\r
24 __top_RAM = 0x20008000 + 0x2b000; /* 172K bytes. */
\r
31 /* Vector Table Section. */
\r
35 __vectors_start__ = ABSOLUTE(.);
\r
36 KEEP(*(.isr_vector))
\r
38 /* Global Section Table. */
\r
40 __section_table_start = .;
\r
42 __data_section_table = .;
\r
43 LONG(LOADADDR(.data));
\r
45 LONG( SIZEOF(.data));
\r
46 __data_section_table_end = .;
\r
48 __bss_section_table = .;
\r
50 LONG( SIZEOF(.bss));
\r
51 __bss_section_table_end = .;
\r
53 __section_table_end = .;
\r
54 /* End of Global Section Table. */
\r
59 /* Privileged functions - Section needs to be 32 byte aligned to satisfy MPU requirements. */
\r
60 .privileged_functions : ALIGN(32)
\r
63 __privileged_functions_start__ = .;
\r
64 *(privileged_functions)
\r
66 /* End address must be the last address in the region, therefore, -1. */
\r
67 __privileged_functions_end__ = . - 1;
\r
70 /* FreeRTOS System calls - Section needs to be 32 byte aligned to satisfy MPU requirements. */
\r
71 .freertos_system_calls : ALIGN(32)
\r
74 __syscalls_flash_start__ = .;
\r
75 *(freertos_system_calls)
\r
77 /* End address must be the last address in the region, therefore, -1. */
\r
78 __syscalls_flash_end__ = . - 1;
\r
81 /* Main Text Section - Section needs to be 32 byte aligned to satisfy MPU requirements. */
\r
85 __unprivileged_flash_start__ = .;
\r
87 *(.rodata .rodata.* .constdata .constdata.*)
\r
89 /* End address must be the last address in the region, therefore, -1. */
\r
90 __unprivileged_flash_end__ = . - 1;
\r
93 /* For exception handling/unwind - some Newlib functions (in common
\r
94 * with C++ and StdC++) use this. */
\r
95 .ARM.extab : ALIGN(4)
\r
97 *(.ARM.extab* .gnu.linkonce.armextab.*)
\r
100 .ARM.exidx : ALIGN(4)
\r
103 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
\r
107 /* Text Section End. */
\r
110 /* Uninit Reserved Section. */
\r
111 .uninit_RESERVED : ALIGN(4)
\r
113 KEEP(*(.bss.$RESERVED*))
\r
115 _end_uninit_RESERVED = .;
\r
118 /* Main Data section (Ram0). */
\r
123 PROVIDE(__start_data_RAM = .);
\r
124 PROVIDE(__start_data_Ram0 = .);
\r
126 /* Privileged data - It needs to be 32 byte aligned to satisfy MPU requirements. */
\r
128 __privileged_sram_start__ = .;
\r
129 *(privileged_data);
\r
131 /* End address must be the last address in the region, therefore, -1. */
\r
132 __privileged_sram_end__ = . - 1;
\r
138 PROVIDE(__end_data_RAM = .);
\r
139 PROVIDE(__end_data_Ram0 = .);
\r
140 } > Ram0 AT>PROGRAM_FLASH
\r
142 /* Main BSS Section. */
\r
146 PROVIDE(__start_bss_RAM = .);
\r
147 PROVIDE(__start_bss_Ram0 = .);
\r
152 PROVIDE(__end_bss_RAM = .);
\r
153 PROVIDE(__end_bss_Ram0 = .);
\r
157 /* Default Noinit Section. */
\r
158 .noinit (NOLOAD) : ALIGN(4)
\r
161 PROVIDE(__start_noinit_RAM = .);
\r
162 PROVIDE(__start_noinit_Ram0 = .);
\r
166 PROVIDE(__end_noinit_RAM = .);
\r
167 PROVIDE(__end_noinit_Ram0 = .);
\r
170 /* Reserve space and place heap in memory map. */
\r
171 _HeapSize = 0x1000;
\r
180 /* Reserve space for stack in memory. */
\r
181 _StackSize = 0x1000;
\r
187 /* Place actual stack in memory map. */
\r
188 .stack ORIGIN(Ram0) + LENGTH(Ram0) - _StackSize - 0 : ALIGN(4)
\r
192 _vStackTop = . + _StackSize;
\r
195 /* Create checksum value (used in startup). */
\r
196 PROVIDE(__valid_user_code_checksum = 0 -
\r
199 + (NMI_Handler + 1)
\r
200 + (HardFault_Handler + 1)
\r
201 + (( DEFINED(MemManage_Handler) ? MemManage_Handler : 0 ) + 1) /* MemManage_Handler may not be defined. */
\r
202 + (( DEFINED(BusFault_Handler) ? BusFault_Handler : 0 ) + 1) /* BusFault_Handler may not be defined. */
\r
203 + (( DEFINED(UsageFault_Handler) ? UsageFault_Handler : 0 ) + 1) /* UsageFault_Handler may not be defined. */
\r
206 /* Provide basic symbols giving location and size of main text block,
\r
207 * including initial values of RW data sections. Note that these will need
\r
208 * extending to give a complete picture with complex images
\r
209 * (e.g multiple Flash banks). */
\r
210 _image_start = LOADADDR(.text);
\r
211 _image_end = LOADADDR(.data) + SIZEOF(.data);
\r
212 _image_size = _image_end - _image_start;
\r