-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathlinker-script.ld
More file actions
34 lines (29 loc) · 797 Bytes
/
linker-script.ld
File metadata and controls
34 lines (29 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
MEMORY
{
flash : ORIGIN = 0x08000000, LENGTH = 64k
ram : ORIGIN = 0x20000000, LENGTH = 8k
}
/*
Specify the entry point so that it does not get removed by the linker as
an unused section.
*/
ENTRY(Reset)
/* Keep the following symbol even though it is not referenced */
EXTERN(RESET_HANDLER)
SECTIONS
{
.vector_table ORIGIN(flash) :
{
LONG(ORIGIN(ram) + LENGTH(ram)); /* Stack Point value */
KEEP(*(.vector_table.reset_vector)); /* Reset Function pointer */
} > flash
.text : { *(.text .text.*); } > flash
/* set the location counter to the address (ORIGIN property) of ram */
. = ORIGIN(ram);
/* the output .text section will be starting at the ram address */
.data : { *(.data) } > ram
/DISCARD/ :
{
*(.ARM.exidx .ARM.exidx.*);
}
}