-
Notifications
You must be signed in to change notification settings - Fork 0
/
blue.icf
122 lines (111 loc) · 8.11 KB
/
blue.icf
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
110
111
112
113
114
115
116
117
118
119
120
121
122
/*********************************************************************
* SEGGER Microcontroller GmbH *
* The Embedded Experts *
**********************************************************************
* *
* (c) 2014 - 2020 SEGGER Microcontroller GmbH *
* *
* www.segger.com Support: [email protected] *
* *
**********************************************************************
* *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or *
* without modification, are permitted provided that the following *
* condition is met: *
* *
* - Redistributions of source code must retain the above copyright *
* notice, this condition and the following disclaimer. *
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
* *
**********************************************************************/
define memory with size = 4G;
//
// Combined regions per memory type
//
define region APP1 = [from 512k size 4k];
define region APP2 = [from 768k size 4k];
define region FLASH = FLASH1 - APP1 - APP2;
define region RAM = RAM1;
//
// Block definitions
//
define block vectors { section .vectors };
define block vectors_ram { section .vectors_ram };
define block ctors { section .ctors, section .ctors.*, block with alphabetical order { init_array } };
define block dtors { section .dtors, section .dtors.*, block with reverse alphabetical order { fini_array } };
define block exidx { section .ARM.exidx, section .ARM.exidx.* };
define block tbss { section .tbss, section .tbss.* };
define block tdata { section .tdata, section .tdata.* };
define block tls { block tbss, block tdata };
define block tdata_load { copy of block tdata };
define block heap with size = __HEAPSIZE__, alignment = 8, /* fill =0x00, */ readwrite access { };
define block stack with size = __STACKSIZE__, alignment = 8, /* fill =0xCD, */ readwrite access { };
//
// Explicit initialization settings for sections
//
do not initialize { section .non_init, section .non_init.*, section .*.non_init, section .*.non_init.* };
do not initialize { section .no_init, section .no_init.*, section .*.no_init, section .*.no_init.* }; // Legacy sections, kept for backwards compatibility
do not initialize { section .noinit, section .noinit.*, section .*.noinit, section .*.noinit.* }; // Legacy sections, used by some SDKs/HALs
do not initialize { block vectors_ram };
initialize by copy /* with packing=auto */ { section .data, section .data.*, section .*.data, section .*.data.* }; // Static data sections
initialize by copy /* with packing=auto */ { section .fast, section .fast.* }; // "RAM Code" sections
initialize by symbol __SEGGER_init_heap { block heap }; // Init the heap if there is one
initialize by symbol __SEGGER_init_ctors { block ctors }; // Call constructors for global objects which need to be constructed before reaching main (if any). Make sure this is done after setting up heap.
//
// Explicit placement in APP1
//
place in APP1 { section .app1 };
keep { symbol app_main };
//
// Explicit placement in FLASHn
//
place in FLASH1 { section .FLASH1, section .FLASH1.* };
place in EXTFLASH1 { section .EXTFLASH1, section .EXTFLASH1.* };
//
// FLASH Placement
//
place at start of FLASH { block vectors }; // Vector table section
place in FLASH with minimum size order { section .init, section .init.*, // Init code section
section .init_rodata, section .init_rodata.*, // Init read-only section
section .text, section .text.*, // Code section
section .rodata, section .rodata.*, // Read-only data section
section .segger.*, // Auto-generated initialization
section .ARM.extab.*, // ARM exception table
block exidx, // ARM exception unwinding block
block ctors, // Constructors block
block dtors }; // Destructors block
place in FLASH { block tdata_load }; // Thread-local-storage load image
//
// Explicit placement in RAMn
//
place in RAM1 { section .RAM1, section .RAM1.* };
place in CODE_RAM1 { section .CODE_RAM1, section .CODE_RAM1.* };
//
// RAM Placement
//
place at start of RAM { block vectors_ram };
place in RAM { section .non_init, section .non_init.*, // No initialization section
section .no_init, section .no_init.*, // No initialization section, for backwards compatibility
section .noinit, section .noinit.*, // No initialization section, used by some SDKs/HALs
block tls }; // Thread-local-storage block
place in RAM with auto order { section .fast, section .fast.*, // "ramfunc" section
section .data, section .data.*, // Initialized data section
section .bss, section .bss.* // Static data section
};
place in RAM { block heap }; // Heap reserved block
place at end of RAM { block stack }; // Stack reserved block at the end