-
Notifications
You must be signed in to change notification settings - Fork 1
/
stm32f1.ld
72 lines (64 loc) · 1.28 KB
/
stm32f1.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
/**
* @file stm32f1.ld
* @author Rohit Nimkar (nehalnimkar@gmail.com)
* @brief Linker script for stm32f103c8t6 micro-controller
* @version 1.2
* @date 2022-12-07
*
* @copyright Copyright (c) 2022
* @attention
*
* This software component is licensed by Rohit Nimkar under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause
*
*/
ENTRY(Reset_Handler)
MEMORY
{
FLASH(rx):ORIGIN =0x08000000,LENGTH =64K
SRAM(rwx):ORIGIN =0x20000000,LENGTH =20K
}
SECTIONS
{
.isr_vector :
{
KEEP(*(.isr_vector));
. = ALIGN(4);
}> FLASH
.text :
{
*(.text)
*(.text.*)
*(.init)
*(.fini)
*(.rodata)
*(.rodata.*)
. = ALIGN(4);
_etext = .;
}> FLASH
_la_data = LOADADDR(.data);
.data :
{
_sdata = .;
*(.data)
*(.data.*)
. = ALIGN(4);
_edata = .;
}> SRAM AT> FLASH
.bss :
{
_sbss = .;
__bss_start__ = _sbss;
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
__bss_end__ = _ebss;
. = ALIGN(4);
end = .;
__end__ = .;
}> SRAM
PROVIDE(_stack_top = ORIGIN(SRAM) + LENGTH(SRAM));
}