-
Notifications
You must be signed in to change notification settings - Fork 12
/
arm_cm3.ld
71 lines (60 loc) · 1.83 KB
/
arm_cm3.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
67
68
69
70
71
OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K
RAM (rxw) : ORIGIN = 0x20000000, LENGTH = 20K
}
STACK_SIZE = 256;
HEAP_SIZE = 256;
ENTRY(Reset_Handler)
PROVIDE(__stack_top = ALIGN(ORIGIN(RAM) + LENGTH(RAM) - 8 ,8));
PROVIDE(NMI_Handler = BusyDummy_Handler);
PROVIDE(HardFault_Handler = BusyDummy_Handler);
PROVIDE(MemManage_Handler = BusyDummy_Handler);
PROVIDE(BusFault_Handler = BusyDummy_Handler);
PROVIDE(UsageFault_Handler = BusyDummy_Handler);
PROVIDE(SVC_Handler = Dummy_Handler);
PROVIDE(DebugMon_Handler = Dummy_Handler);
PROVIDE(PendSV_Handler = Dummy_Handler);
PROVIDE(SysTick_Handler = Dummy_Handler);
SECTIONS {
.text : {
LONG(__stack_top);
KEEP(*(.isr_vector))
*(.text)
*(.rodata)
. = ALIGN(4);
} > FLASH
__exidx_start = .;
.ARM.exidx : {
*(.ARM.exidx*)
. = ALIGN(4);
} > FLASH
__exidx_end = .;
__text_end = .;
.data : AT(__text_end) {
__data_start = .;
*(SORT_BY_ALIGNMENT(.data*))
. = ALIGN(4);
} > RAM
__data_size = SIZEOF(.data);
.bss (NOLOAD) : {
__bss_start = .;
*(SORT_BY_ALIGNMENT(.bss*) SORT_BY_ALIGNMENT(COMMON*))
. = ALIGN(4);
} > RAM
__bss_size = SIZEOF(.bss);
/* DWARF 4 */
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_aranges 0 : { *(.debug_aranges) }
.debug_frame 0 : { *(.debug_frame) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
.debug_str 0 : { *(.debug_str) }
.debug_types 0 : { *(.debug_types) }
}