-
Notifications
You must be signed in to change notification settings - Fork 11
/
bootlink.ld
48 lines (44 loc) · 1.09 KB
/
bootlink.ld
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
LM3S3N26/Cygni Linker
teho Labs 2011
For use with the bootloader
See: http://sourceware.org/binutils/docs/ld/index.html
for docs and examples
*/
MEMORY
{
FLASH (rx) : ORIGIN = 0x00001000, LENGTH = 64K
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 12K
}
SECTIONS
{
/*All of the program code is in flash memory along with the interupt table and read only data*/
.text :
{
_text = .; /*start text symbol*/
KEEP(*(.isr_vector))
*(.text*)
*(.rodata*)
_etext = .; /*end of text symbol*/
} >FLASH
/*
This is the initalized data section, it follows the .text section in the binary image
The values are copied to RAM by using the _etext label above, and knowing the length via _edata below
see ResetISR in startup_gcc.c
*/
.data : AT(ADDR(.text) + SIZEOF(.text))
{
_data = .; /*start of data symbol*/
*(vtable)
*(.data*)
_edata = .; /*end of data symbol*/
} >SRAM
/*This stores basically blank global vars (IE char global_buffer[100];) it is intialized to 0*/
.bss :
{
_bss = .; /*start bss data symbol*/
*(.bss*)
*(COMMON)
_ebss = .; /*end bss data symbol*/
} >SRAM
}