-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
memory.x
68 lines (55 loc) · 1.61 KB
/
memory.x
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
SECTIONS {
. = DEFINED(ALGO_PLACEMENT_START_ADDRESS) ? ALGO_PLACEMENT_START_ADDRESS : 0x0;
/*
* The PrgCode output section name comes from the CMSIS-Pack flash algorithms
* templates and armlink. It is used here because several tools that work
* with these flash algorithms expect this section name.
*
* All input sections are combined into PrgCode because RWPI using R9 is not
* currently stable in Rust, thus having separate PrgData sections that the
* debug host might locate at a different offset from PrgCode is not safe.
*/
PrgCode : {
KEEP(*(.entry))
KEEP(*(.entry.*))
*(.text)
*(.text.*)
*(.rodata)
*(.rodata.*)
*(.data)
*(.data.*)
*(.sdata)
*(.sdata.*)
*(.bss)
*(.bss.*)
*(.uninit)
*(.uninit.*)
. = ALIGN(4);
}
/* Section for data, specified by flashloader standard. */
PrgData : {
*(.data .data.*)
*(.sdata .sdata.*)
}
PrgData : {
/* Zero-initialized data */
*(.bss .bss.*)
*(.sbss .sbss.*)
*(COMMON)
}
/* Description of the flash algorithm */
DeviceData . : {
/* The device data content is only for external tools,
* and usually not referenced by the code.
*
* The KEEP statement ensures it's not removed by accident.
*/
KEEP(*(DeviceData))
}
/DISCARD/ : {
/* Unused exception related info that only wastes space */
*(.ARM.exidx);
*(.ARM.exidx.*);
*(.ARM.extab.*);
}
}