-
Notifications
You must be signed in to change notification settings - Fork 6
/
nRF52833.ld
109 lines (98 loc) · 3.72 KB
/
nRF52833.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/* common/nRF52833.ld */
/* Copyright (c) 2018-20 J. M. Spivey */
MEMORY {
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 512K
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 124K
CODERAM (rwx) : ORIGIN = 0x00800000+124K, LENGTH = 4K
}
OUTPUT_FORMAT ("elf32-littlearm")
/* Setting the entry address helps GDB to find the stack bottom */
ENTRY(__reset)
SECTIONS {
.text ALIGN(16) : SUBALIGN(16) {
KEEP(*(.vectors))
*(.text*)
*(.rodata*)
. = ALIGN(4);
__etext = .;
PROVIDE(nmi_handler = default_handler);
PROVIDE(hardfault_handler = default_handler);
PROVIDE(svc_handler = default_handler);
PROVIDE(debugmon_handler = default_handler);
PROVIDE(pendsv_handler = default_handler);
PROVIDE(systick_handler = default_handler);
PROVIDE(power_clock_handler = default_handler);
PROVIDE(radio_handler = default_handler);
PROVIDE(uart0_handler = default_handler);
PROVIDE(i2c_spi0_handler = default_handler);
PROVIDE(i2c_spi1_handler = default_handler);
PROVIDE(nfc_handler = default_handler);
PROVIDE(gpiote_handler = default_handler);
PROVIDE(adc_handler = default_handler);
PROVIDE(timer0_handler = default_handler);
PROVIDE(timer1_handler = default_handler);
PROVIDE(timer2_handler = default_handler);
PROVIDE(rtc0_handler = default_handler);
PROVIDE(temp_handler = default_handler);
PROVIDE(rng_handler = default_handler);
PROVIDE(ecb_handler = default_handler);
PROVIDE(ccm_aar_handler = default_handler);
PROVIDE(wdt_handler = default_handler);
PROVIDE(rtc1_handler = default_handler);
PROVIDE(qdec_handler = default_handler);
PROVIDE(lpcomp_handler = default_handler);
PROVIDE(swi0_handler = default_handler);
PROVIDE(swi1_handler = default_handler);
PROVIDE(swi2_handler = default_handler);
PROVIDE(swi3_handler = default_handler);
PROVIDE(swi4_handler = default_handler);
PROVIDE(swi5_handler = default_handler);
PROVIDE(timer3_handler = default_handler);
PROVIDE(timer4_handler = default_handler);
PROVIDE(pwm0_handler = default_handler);
PROVIDE(pdm_handler = default_handler);
PROVIDE(mwu_handler = default_handler);
PROVIDE(pwm1_handler = default_handler);
PROVIDE(pwm2_handler = default_handler);
PROVIDE(spi2_handler = default_handler);
PROVIDE(rtc2_handler = default_handler);
PROVIDE(i2s_handler = default_handler);
PROVIDE(fpu_handler = default_handler);
PROVIDE(usbd_handler = default_handler);
PROVIDE(uart1_handler = default_handler);
PROVIDE(pwm3_handler = default_handler);
PROVIDE(spi3_handler = default_handler);
} > FLASH
.xram : AT (LOADADDR(.text) + SIZEOF(.text)) {
__xram_start = .;
*(.xram*)
. = ALIGN(4);
__xram_end = .;
} > CODERAM
/DISCARD/ : {
/* Some parts of the GCC library have C++ exception data,
which is of no use to us. */
*(.ARM.extab)
*(.ARM.exidx)
}
.data : AT (LOADADDR(.xram) + SIZEOF(.xram)) {
__data_start = .;
*(.data*)
. = ALIGN(4);
__data_end = .;
} > RAM
.bss : {
__bss_start = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end = .;
__end = .;
} > RAM
/* Set stack top to end of RAM, and move stack limit down by
size of stack */
__stack = ORIGIN(RAM) + LENGTH(RAM);
__stack_limit = __stack - 2048;
/* Check if data + stack exceeds RAM limit */
ASSERT(__stack_limit >= __end, "region RAM overlaps with stack")
}