SiLabs Pearl: Mbed support for linker script

Mbed needs to have interrupt vectors in RAM so reserve space at
the beginning of memory, and export the relevant symbols.
pull/1501/head
Mikko Polojarvi 2015-10-14 13:31:58 +03:00 committed by Steven Cooreman
parent c89d5cae9d
commit 2cb2ada9b6
1 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,11 @@ MEMORY
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 32768
}
/* MBED: mbed needs to be able to dynamically set the interrupt vector table.
* We make room for the table at the very beginning of RAM, i.e. at
* 0x20000000. We need (16+34) * sizeof(uint32_t) = 200 bytes for EFM32LG */
__vector_size = 0xC8;
/* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM.
* It references following symbols, which must be defined in code:
@ -133,6 +138,9 @@ SECTIONS
.data : AT (__etext)
{
__data_start__ = .;
PROVIDE( __start_vector_table__ = .);
. += __vector_size;
PROVIDE( __end_vector_table__ = .);
*(vtable)
*(.data*)
. = ALIGN (4);