2014-05-14 09:14:36 +00:00
|
|
|
/*
|
2015-01-11 13:56:55 +00:00
|
|
|
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
|
2014-05-14 09:14:36 +00:00
|
|
|
|
2015-01-11 13:56:55 +00:00
|
|
|
This file is part of ChibiOS.
|
2014-05-14 09:14:36 +00:00
|
|
|
|
2015-01-11 13:56:55 +00:00
|
|
|
ChibiOS is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
2014-05-14 09:14:36 +00:00
|
|
|
|
2015-01-11 13:56:55 +00:00
|
|
|
ChibiOS is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2014-05-14 09:14:36 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
__stacks_total_size__ = __und_stack_size__ + __abt_stack_size__ + __fiq_stack_size__ + __irq_stack_size__ + __svc_stack_size__ + __sys_stack_size__;
|
|
|
|
__main_thread_stack_base__ = __ram_start__;
|
|
|
|
|
|
|
|
__ram_start__ = ORIGIN(ram);
|
|
|
|
__ram_size__ = LENGTH(ram);
|
|
|
|
__ram_end__ = __ram_start__ + __ram_size__;
|
|
|
|
__ram1_start__ = ORIGIN(ram1);
|
|
|
|
__ram1_size__ = LENGTH(ram1);
|
|
|
|
__ram1_end__ = __ram1_start__ + __ram1_size__;
|
|
|
|
__ram2_start__ = ORIGIN(ram2);
|
|
|
|
__ram2_size__ = LENGTH(ram2);
|
|
|
|
__ram2_end__ = __ram2_start__ + __ram2_size__;
|
|
|
|
__ram3_start__ = ORIGIN(ram3);
|
|
|
|
__ram3_size__ = LENGTH(ram3);
|
|
|
|
__ram3_end__ = __ram3_start__ + __ram3_size__;
|
|
|
|
|
|
|
|
ENTRY(Reset_Handler)
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
. = 0;
|
|
|
|
_text = .;
|
|
|
|
|
2014-10-13 19:50:41 +00:00
|
|
|
startup : ALIGN(16) SUBALIGN(16)
|
2014-05-14 09:14:36 +00:00
|
|
|
{
|
|
|
|
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)
|
|
|
|
*(.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
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
_etext = .;
|
|
|
|
_textdata = _etext;
|
|
|
|
|
|
|
|
.stacks :
|
|
|
|
{
|
|
|
|
. = ALIGN(8);
|
|
|
|
___stacks_base__ = .;
|
|
|
|
. += __stacks_total_size__;
|
|
|
|
. = ALIGN(8);
|
|
|
|
___stacks_end__ = .;
|
|
|
|
} > ram
|
|
|
|
|
2014-11-23 09:34:24 +00:00
|
|
|
.data ALIGN(4) : ALIGN(4)
|
2014-05-14 09:14:36 +00:00
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_data = .);
|
|
|
|
*(.data)
|
|
|
|
*(.data.*)
|
|
|
|
*(.ramtext)
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_edata = .);
|
|
|
|
} > ram AT > flash
|
|
|
|
|
2014-11-23 09:34:24 +00:00
|
|
|
.bss ALIGN(4) : ALIGN(4)
|
2014-05-14 09:14:36 +00:00
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_bss_start = .);
|
|
|
|
*(.bss)
|
|
|
|
*(.bss.*)
|
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(4);
|
|
|
|
PROVIDE(_bss_end = .);
|
|
|
|
} > ram
|
|
|
|
}
|
|
|
|
|
|
|
|
PROVIDE(end = .);
|
|
|
|
_end = .;
|
|
|
|
|
|
|
|
__heap_base__ = _end;
|
|
|
|
__heap_end__ = __ram_end__;
|