Mcucpp

Форк
0
/
stm32_100xB.ld 
167 строк · 4.0 Кб
1
/**
2
* linker script for STM32F10x Medium Density Value Line Devices
3
*/
4

5
ENTRY(ResetISR)
6

7
_Minimum_Stack_Size = 0x400;
8

9
MEMORY
10
{
11
	RAM (xrw)	: ORIGIN = 0x20000000, LENGTH =  8K
12
	FLASH (rx)	: ORIGIN = 0x08000000, LENGTH = 128K
13
}
14

15
/* higher address of the user mode stack */
16
PROVIDE ( _estack = ALIGN(ORIGIN(RAM) + LENGTH(RAM) - 8 ,8) );
17

18
SECTIONS
19
{
20
	.isr_vectors :
21
	{
22
		. = ALIGN(4);
23
		KEEP(*(.isr_vectors))
24
		. = ALIGN(4);
25
	} > FLASH
26
	
27
	.metadata_section :
28
	{
29
		. = ALIGN(8);
30
		KEEP(*(.crc_section))
31
		. = ALIGN(8);
32
	} > FLASH
33

34
	.text :
35
	{
36
		_stext = .;
37
		__ctors_start__ = .;
38
		KEEP(SORT(*)(.init_array))  /* eabi uses .init_array for static constructor lists */
39
		__ctors_end__ = .;
40

41
		__dtors_start__ = .;
42
		__dtors_end__ = .;
43

44
		. = ALIGN(4);
45
		*(.text)                   /* remaining code */
46
		*(.text.*)
47
		*(.rodata)                 /* read-only data (constants) */
48
		*(.rodata*)
49

50
		*(.eh_frame_hdr)
51
		*(.eh_frame)
52
		*(.ARM.extab* .gnu.linkonce.armextab.*)
53
		*(.gcc_except_table)
54
		*(.eh_frame_hdr)
55
		*(.eh_frame)
56

57
		*(.glue_7)
58
		*(.glue_7t)
59
		. = ALIGN(4);
60
	} > FLASH
61

62
	/* .ARM.exidx is sorted, so has to go in its own output section.  */
63
	__exidx_start = .;
64
	.ARM.exidx :
65
	{
66
		*(.ARM.exidx* .gnu.linkonce.armexidx.*)
67
	} > FLASH
68
	__exidx_end = .;
69

70
	.text.align :
71
	{
72
		. = ALIGN(8);
73
		_etext = .;
74
		_sidata = _etext;		/* start of initialized data label */
75
	} > FLASH
76

77
	.data : AT ( _sidata )		/* AT makes the LMA follow on in the binary image */
78
	{
79
		. = ALIGN(4);
80
		_sdata = .;				/* start of .data label */
81
		KEEP( *(.data) )
82
		KEEP( *(.data.*) )
83
		. = ALIGN(4);
84
		_edata = .;				/* end of .data label */
85
	} > RAM
86

87
	/* .bss section - uninitialized data */
88
	.bss :
89
	{
90
		. = ALIGN(4);
91
		_sbss = .;				/* start of .bss label (for startup) */
92
		 *(.bss)
93
		 *(.bss.*)
94
		 *(COMMON)
95
		. = ALIGN(4);
96
		_ebss = .;				/* end of .bss label (for startup) */
97
		_end = .;				/* end of used ram (start of free memory, for malloc) */
98
		__end = .;				/* the same */
99
	} > RAM
100

101
/*
102
 * This is the user stack section
103
 * This is just to check that there is enough RAM left for the User mode stack
104
 * It should generate an error if it's full.
105
 */
106
    ._usrstack :
107
    {
108
	    . = ALIGN(4);
109
      _susrstack = . ;
110
      . = . + _Minimum_Stack_Size ;
111
      . = ALIGN(4);
112
      _eusrstack = . ;
113
    } >RAM
114

115

116
PROVIDE( _heap = _ebss );
117
PROVIDE ( _eheap = ALIGN(ORIGIN(RAM) + LENGTH(RAM) - 8 ,8) );
118

119
/*
120
 * after that it's only debugging information.
121
 */
122

123
/* remove the debugging information from the standard libraries */
124
DISCARD :
125
	{
126
		libc.a ( * )
127
		libm.a ( * )
128
		libgcc.a ( * )
129
	}
130

131
/* Stabs debugging sections.  */
132
    .stab          0 : { *(.stab) }
133
    .stabstr       0 : { *(.stabstr) }
134
    .stab.excl     0 : { *(.stab.excl) }
135
    .stab.exclstr  0 : { *(.stab.exclstr) }
136
    .stab.index    0 : { *(.stab.index) }
137
    .stab.indexstr 0 : { *(.stab.indexstr) }
138
    .comment       0 : { *(.comment) }
139
/*
140
 * DWARF debug sections.
141
 * Symbols in the DWARF debugging sections are relative to the beginning
142
 * of the section so we begin them at 0.
143
 */
144

145
/* DWARF 1 */
146
    .debug          0 : { *(.debug) }
147
    .line           0 : { *(.line) }
148
/* GNU DWARF 1 extensions */
149
    .debug_srcinfo  0 : { *(.debug_srcinfo) }
150
    .debug_sfnames  0 : { *(.debug_sfnames) }
151
/* DWARF 1.1 and DWARF 2 */
152
    .debug_aranges  0 : { *(.debug_aranges) }
153
    .debug_pubnames 0 : { *(.debug_pubnames) }
154
/* DWARF 2 */
155
    .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
156
    .debug_abbrev   0 : { *(.debug_abbrev) }
157
    .debug_line     0 : { *(.debug_line) }
158
    .debug_frame    0 : { *(.debug_frame) }
159
    .debug_str      0 : { *(.debug_str) }
160
    .debug_loc      0 : { *(.debug_loc) }
161
    .debug_macinfo  0 : { *(.debug_macinfo) }
162
/* SGI/MIPS DWARF 2 extensions */
163
    .debug_weaknames 0 : { *(.debug_weaknames) }
164
    .debug_funcnames 0 : { *(.debug_funcnames) }
165
    .debug_typenames 0 : { *(.debug_typenames) }
166
    .debug_varnames  0 : { *(.debug_varnames) }
167
}
168

169

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.