2013-08-21 14:54:22 +00:00
|
|
|
/*
|
2014-04-21 08:35:49 +00:00
|
|
|
ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2014-04-21 08:35:49 +00:00
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2014-04-21 08:35:49 +00:00
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
2013-08-21 14:54:22 +00:00
|
|
|
|
2014-04-21 08:35:49 +00:00
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
2013-08-21 14:54:22 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
__ram_start__ = ORIGIN(ram);
|
|
|
|
__ram_size__ = LENGTH(ram);
|
|
|
|
__ram_end__ = __ram_start__ + __ram_size__;
|
|
|
|
|
2013-08-22 13:11:51 +00:00
|
|
|
ENTRY(Reset_Handler)
|
2013-08-21 14:54:22 +00:00
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
. = 0;
|
|
|
|
_text = .;
|
|
|
|
|
|
|
|
startup : ALIGN(16) SUBALIGN(16)
|
|
|
|
{
|
|
|
|
KEEP(*(vectors))
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
constructors : ALIGN(4) SUBALIGN(4)
|
|
|
|
{
|
|
|
|
PROVIDE(__init_array_start = .);
|
|
|
|
KEEP(*(SORT(.init_array.*)))
|
|
|
|
KEEP(*(.init_array))
|
|
|
|
PROVIDE(__init_array_end = .);
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
destructors : ALIGN(4) SUBALIGN(4)
|
|
|
|
{
|
|
|
|
PROVIDE(__fini_array_start = .);
|
|
|
|
KEEP(*(.fini_array))
|
|
|
|
KEEP(*(SORT(.fini_array.*)))
|
|
|
|
PROVIDE(__fini_array_end = .);
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
.text : ALIGN(16) SUBALIGN(16)
|
|
|
|
{
|
|
|
|
*(.text.startup.*)
|
|
|
|
*(.text)
|
|
|
|
*(.text.*)
|
|
|
|
*(.rodata)
|
|
|
|
*(.rodata.*)
|
|
|
|
*(.glue_7t)
|
|
|
|
*(.glue_7)
|
|
|
|
*(.gcc*)
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
.ARM.extab :
|
|
|
|
{
|
|
|
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
.ARM.exidx : {
|
|
|
|
PROVIDE(__exidx_start = .);
|
|
|
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
|
|
|
PROVIDE(__exidx_end = .);
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
.eh_frame_hdr :
|
|
|
|
{
|
|
|
|
*(.eh_frame_hdr)
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
.eh_frame : ONLY_IF_RO
|
|
|
|
{
|
|
|
|
*(.eh_frame)
|
|
|
|
} > flash
|
|
|
|
|
|
|
|
.textalign : ONLY_IF_RO
|
|
|
|
{
|
|
|
|
. = ALIGN(8);
|
|
|
|
} > flash
|
|
|
|
|
2013-08-31 08:27:02 +00:00
|
|
|
. = ALIGN(4);
|
2013-08-21 14:54:22 +00:00
|
|
|
_etext = .;
|
|
|
|
_textdata = _etext;
|
|
|
|
|
|
|
|
.stacks :
|
|
|
|
{
|
|
|
|
. = ALIGN(8);
|
|
|
|
__main_stack_base__ = .;
|
|
|
|
. += __main_stack_size__;
|
|
|
|
. = ALIGN(8);
|
|
|
|
__main_stack_end__ = .;
|
|
|
|
__process_stack_base__ = .;
|
|
|
|
__main_thread_stack_base__ = .;
|
|
|
|
. += __process_stack_size__;
|
|
|
|
. = ALIGN(8);
|
|
|
|
__process_stack_end__ = .;
|
|
|
|
__main_thread_stack_end__ = .;
|
2013-09-09 09:34:23 +00:00
|
|
|
} > ram
|
2013-08-21 14:54:22 +00:00
|
|
|
|
|
|
|
.data :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_data = .);
|
|
|
|
*(.data)
|
|
|
|
. = ALIGN(4);
|
|
|
|
*(.data.*)
|
|
|
|
. = ALIGN(4);
|
|
|
|
*(.ramtext)
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_edata = .);
|
|
|
|
} > ram AT > flash
|
|
|
|
|
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_bss_start = .);
|
|
|
|
*(.bss)
|
|
|
|
. = ALIGN(4);
|
|
|
|
*(.bss.*)
|
|
|
|
. = ALIGN(4);
|
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_bss_end = .);
|
|
|
|
} > ram
|
|
|
|
}
|
|
|
|
|
|
|
|
PROVIDE(end = .);
|
|
|
|
_end = .;
|
|
|
|
|
|
|
|
__heap_base__ = _end;
|
|
|
|
__heap_end__ = __ram_end__;
|