Newer
Older
* - Early startup code runs out of flash
* - Everything else runs out of RAM
* - All flash after the first 4K page is reserved for application use
* - The last 4 bytes of RAM are used as our boot token
*/
MEMORY
{
Micah Elizabeth Scott
committed
BOOT_FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 4K
APP_FLASH (rx) : ORIGIN = 0x00001000, LENGTH = 124K
RAM (rwx) : ORIGIN = 0x1FFFE000, LENGTH = 16K
FLEXRAM (rwx) : ORIGIN = 0x14000000, LENGTH = 2K
}
SECTIONS
{
. = 0;
KEEP(*(.vectors))
*(.startup*)
. = 0x400;
KEEP(*(.flashconfig*))
Micah Elizabeth Scott
committed
} > BOOT_FLASH = 0xFF
.apptext (NOLOAD) : {
. = ORIGIN(APP_FLASH);
Micah Elizabeth Scott
committed
*(.appvectors)
} > APP_FLASH = 0xFF
.usbdescriptortable (NOLOAD) : {
. = ALIGN(512);
*(.usbdescriptortable*)
.dmabuffers (NOLOAD) : {
. = ALIGN(4);
*(.dmabuffers*)
.usbbuffers (NOLOAD) : {
. = ALIGN(4);
*(.usbbuffers*)
.flexram (NOLOAD) : {
. = ALIGN(4);
*(.flexram*)
} > FLEXRAM
/* Combined data and text, after relocation */
.dtext : AT (_eflash) {
. = ALIGN(4);
_sdtext = .;
*(.text*)
*(.rodata*)
*(.data*)
. = ALIGN(4);
.noinit (NOLOAD) : {
*(.noinit*)
.bss : {
. = ALIGN(4);
_sbss = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
__bss_end = .;
_estack = ORIGIN(RAM) + LENGTH(RAM) - 4;
boot_token = _estack;