Mcucpp

Форк
0
/
stm32_303x.ld 
163 строки · 3.9 Кб
1

2
ENTRY(Reset_Handler)
3

4
_Minimum_Stack_Size = 0x400;
5

6
MEMORY
7
{
8
	RAM (xrw)	: ORIGIN = 0x20000000, LENGTH =  40K
9
	FLASH (rx)	: ORIGIN = 0x08000000, LENGTH = 256K
10
}
11

12
/* higher address of the user mode stack */
13
PROVIDE ( _estack = ALIGN(ORIGIN(RAM) + LENGTH(RAM) - 8 ,8) );
14

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

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

38
		__dtors_start__ = .;
39
		__dtors_end__ = .;
40

41
		. = ALIGN(4);
42
		*(.text)                   /* remaining code */
43
		*(.text.*)
44
		*(.rodata)                 /* read-only data (constants) */
45
		*(.rodata*)
46

47
		*(.eh_frame_hdr)
48
		*(.eh_frame)
49
		*(.ARM.extab* .gnu.linkonce.armextab.*)
50
		*(.gcc_except_table)
51
		*(.eh_frame_hdr)
52
		*(.eh_frame)
53

54
		*(.glue_7)
55
		*(.glue_7t)
56
		. = ALIGN(4);
57
	} > FLASH
58

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

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

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

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

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

112

113
PROVIDE( _heap = _ebss );
114
PROVIDE ( _eheap = ALIGN(ORIGIN(RAM) + LENGTH(RAM) - 8 ,8) );
115

116
/*
117
 * after that it's only debugging information.
118
 */
119

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

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

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

166

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

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

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

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