Skip to content
Snippets Groups Projects
Commit ca40deba authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

Simplify linker script for FC-Boot, no more RAM IVT

parent 29ce7244
No related branches found
No related tags found
No related merge requests found
...@@ -30,15 +30,9 @@ ...@@ -30,15 +30,9 @@
MEMORY MEMORY
{ {
/* Boot and application partitions in flash */
BOOT_FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 4K BOOT_FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 4K
APP_FLASH (rx) : ORIGIN = 0x00001000, LENGTH = 124K APP_FLASH (rx) : ORIGIN = 0x00001000, LENGTH = 124K
RAM (rwx) : ORIGIN = 0x1FFFE000, LENGTH = 16K
/* Boot and application partitions in RAM */
BOOT_RAM (rwx) : ORIGIN = 0x1FFFE000, LENGTH = 256
APP_RAM (rwx) : ORIGIN = 0x1FFFE100, LENGTH = 16128
/* Special RAM used for programming flash */
FLEXRAM (rwx) : ORIGIN = 0x14000000, LENGTH = 2K FLEXRAM (rwx) : ORIGIN = 0x14000000, LENGTH = 2K
} }
...@@ -52,44 +46,28 @@ SECTIONS ...@@ -52,44 +46,28 @@ SECTIONS
KEEP(*(.flashconfig*)) KEEP(*(.flashconfig*))
*(.text*) *(.text*)
*(.rodata*) *(.rodata*)
. = ALIGN(4);
KEEP(*(.init))
. = ALIGN(4);
__preinit_array_start = .;
KEEP (*(.preinit_array))
__preinit_array_end = .;
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
} > BOOT_FLASH = 0xFF } > BOOT_FLASH = 0xFF
_etext = .; _etext = .;
.apptext : { .apptext : {
. = 0; . = ORIGIN(APP_FLASH);
*(.appvectors) *(.appvectors)
} > APP_FLASH = 0xFF } > APP_FLASH = 0xFF
.bootram (NOLOAD) : {
. = 0;
*(.bootram)
} > BOOT_RAM
.usbdescriptortable (NOLOAD) : { .usbdescriptortable (NOLOAD) : {
/* . = ORIGIN(RAM); */
. = ALIGN(512); . = ALIGN(512);
*(.usbdescriptortable*) *(.usbdescriptortable*)
} > APP_RAM } > RAM
.dmabuffers (NOLOAD) : { .dmabuffers (NOLOAD) : {
. = ALIGN(4); . = ALIGN(4);
*(.dmabuffers*) *(.dmabuffers*)
} > APP_RAM } > RAM
.usbbuffers (NOLOAD) : { .usbbuffers (NOLOAD) : {
. = ALIGN(4); . = ALIGN(4);
*(.usbbuffers*) *(.usbbuffers*)
} > APP_RAM } > RAM
.flexram (NOLOAD) : { .flexram (NOLOAD) : {
. = ALIGN(4); . = ALIGN(4);
...@@ -102,11 +80,11 @@ SECTIONS ...@@ -102,11 +80,11 @@ SECTIONS
*(.data*) *(.data*)
. = ALIGN(4); . = ALIGN(4);
_edata = .; _edata = .;
} > APP_RAM } > RAM
.noinit (NOLOAD) : { .noinit (NOLOAD) : {
*(.noinit*) *(.noinit*)
} > APP_RAM } > RAM
.bss : { .bss : {
. = ALIGN(4); . = ALIGN(4);
...@@ -116,9 +94,10 @@ SECTIONS ...@@ -116,9 +94,10 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
_ebss = .; _ebss = .;
__bss_end = .; __bss_end = .;
} > APP_RAM } > RAM
_estack = ORIGIN(APP_RAM) + LENGTH(APP_RAM); _estack = ORIGIN(RAM) + LENGTH(RAM) - 4;
boot_token = _estack;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment