-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlpc2378_flash.ld
executable file
·66 lines (53 loc) · 2.13 KB
/
lpc2378_flash.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* Identifica o ponto de entrada */
ENTRY(_startup)
/* Especifica as areas de memoria do LPC2378 */
MEMORY
{
flash : ORIGIN = 0, LENGTH = 524288 /* FLASH ROM */
ram : ORIGIN = 0x40000000, LENGTH = 32736 /* Memoria RAM */
ram_isp_high(A) : ORIGIN = 0x40007FE0, LENGTH = 32 /* Variaveis usadas pelo Boot Loader da ROM*/
}
/* define a global symbol _stack_end */
_stack_end = 0x40007EDC;
/* now define the output sections */
SECTIONS
{
. = 0; /* set location counter to address zero */
startup : { *(.startup)
_estartup = .;
} >flash /* the startup code goes into FLASH */
.text : /* collect all sections that should go into FLASH after startup */
{
_text = .;
crt.o(.text) /* all .text sections (code) */
crt.o(.rodata) /* all .rodata sections (constants, strings, etc.) */
crt.o(.rodata*) /* all .rodata* sections (constants, strings, etc.) */
crt.o(.glue_7) /* all .glue_7 sections (no idea what these are) */
crt.o(.glue_7t) /* all .glue_7t sections (no idea what these are) */
_etext = .; /* define a global symbol _etext just after the last code byte */
} >flash /* put all the above into FLASH */
.kex :
{
_kex = .;
*(.text)
*(.rodata)
*(.rodata*)
*(.glue_7)
*(.glue_7t)
_ekex = .;
} >ram AT >flash
.data : /* As secçoes .data sao dados inicializados */
{
_data = .; /* O simbolo _data marca o inicio da secção .data */
*(.data) /* all .data sections */
_edata = .; /* _edata marca o fim de .data section */
} >ram AT >flash /* put all the above into RAM (but load the LMA copy into FLASH) */
.bss : /* collect all uninitialized .bss sections that go into RAM */
{
_bss_start = .; /* define a global symbol marking the start of the .bss section */
*(.bss) /* all .bss sections */
} >ram /* put all the above in RAM (it will be cleared in the startup code */
. = ALIGN(4); /* advance location counter to the next 32-bit boundary */
_bss_end = . ; /* define a global symbol marking the end of the .bss section */
}
_end = .; /* define a global symbol marking the end of application RAM */