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
@@ -83,13 +84,14 @@ SECTIONS
_etext_ram = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */
_etext_rom = 0; /* Start of Code in RAM NULL because Copy of Code from ROM to RAM disabled */
. = ORIGIN(ram_local2);
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
. = ALIGN(4);
_edata = .;
} >ram AT >rom
_data_loadaddr = LOADADDR(.data);
} >ram_local2 AT >rom
.bss : {
_bss = .;
@@ -97,8 +99,16 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
_ebss = .;
} >ram
} >ram_local2
<<<<<<< HEAD
=======
/* exception unwind data - required due to libgcc.a issuing /0 exceptions */
.ARM.extab : {
*(.ARM.extab*)
} >ram_local2
>>>>>>> bba3412... Changed ldscripts to use new RAM region names, placed .data/.bss/stack into separate local RAM region.
/*
* The .eh_frame section appears to be used for C++ exception handling.
* You may need to fix this if you're using C++.
@@ -109,6 +119,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);
}