Changed ldscripts to use new RAM region names, placed .data/.bss/stack into separate local RAM region.

Added ldscript for RAM-only debugging over SWD or JTAG.
This commit is contained in:
Jared Boone
2012-10-10 14:21:39 -07:00
committed by Piotr Esden-Tempski
parent ffffb71ba2
commit 18d72099a5
3 changed files with 126 additions and 10 deletions

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
* Copyright (C) 2012 Michael Ossmann <mike@ossmann.com>
* Copyright (C) 2012 Benjamin Vernoux <titanmkd@gmail.com>
* Copyright (C) 2012 Jared Boone <jared@sharebrained.com>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -34,7 +35,7 @@ SECTIONS
{
.text : {
. = ALIGN(0x400);
_text_ram = (. - ORIGIN(rom)) + ORIGIN(ram); /* Start of Code in RAM */
_text_ram = (. - ORIGIN(rom)) + ORIGIN(ram_local1); /* Start of Code in RAM */
*(.vectors) /* Vector table */
*(.text*) /* Program code */
@@ -81,7 +82,7 @@ SECTIONS
. = ALIGN(4);
_etext = .;
_etext_ram = (. - ORIGIN(rom)) + ORIGIN(ram);
_etext_ram = (. - ORIGIN(rom)) + ORIGIN(ram_local1);
_etext_rom = (. - ORIGIN(rom)) + ORIGIN(rom_flash);
.data : {
@@ -89,8 +90,7 @@ SECTIONS
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
} >ram_data AT >rom
_data_loadaddr = LOADADDR(.data);
} >ram_local2 AT >rom
.bss : {
. = _edata;
@@ -99,7 +99,13 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >ram_data
} >ram_local2
/* exception unwind data - required due to libgcc.a issuing /0 exceptions */
.ARM.extab : {
. = _ebss;
*(.ARM.extab*)
} >ram_local2
/*
* The .eh_frame section appears to be used for C++ exception handling.
@@ -111,6 +117,6 @@ SECTIONS
end = .;
/* Leave room above stack for IAP to run. */
__StackTop = ORIGIN(ram) + LENGTH(ram) - 32;
__StackTop = ORIGIN(ram_local2) + LENGTH(ram_local2) - 32;
PROVIDE(_stack = __StackTop);
}