2021-05-12 01:05:03 +08:00
|
|
|
ENTRY(_reset);
|
2021-05-11 16:12:06 +08:00
|
|
|
MEMORY {
|
2021-05-18 00:36:57 +08:00
|
|
|
ram(rwx) : ORIGIN = 0x20000000, LENGTH = 307k
|
2021-05-13 21:56:14 +08:00
|
|
|
rom(rx) : ORIGIN = 0x08000000, LENGTH = 1024k
|
2021-05-11 16:12:06 +08:00
|
|
|
}
|
2021-05-18 00:36:57 +08:00
|
|
|
_estack = ORIGIN(ram) + LENGTH(ram); /* boot.s and init_heap() */
|
2021-05-11 16:12:06 +08:00
|
|
|
SECTIONS {
|
2021-05-18 00:36:57 +08:00
|
|
|
.vectortab : { KEEP(*(.vectortab)) } > rom
|
|
|
|
.text : { *(.text*) } > rom
|
|
|
|
.rodata : { *(.rodata*) } > rom
|
|
|
|
|
|
|
|
.data : {
|
|
|
|
_sdata = .; /* for init_ram() */
|
|
|
|
*(.first_data)
|
|
|
|
*(.data SORT(.data.*))
|
|
|
|
_edata = .; /* for init_ram() */
|
|
|
|
} > ram AT > rom
|
|
|
|
_sidata = LOADADDR(.data);
|
2021-05-11 16:12:06 +08:00
|
|
|
|
|
|
|
.bss : {
|
2021-05-18 00:36:57 +08:00
|
|
|
_sbss = .; /* for init_ram() */
|
|
|
|
__bss_start__ = _sbss; /* for libc */
|
2021-05-11 16:12:06 +08:00
|
|
|
*(.bss SORT(.bss.*) COMMON)
|
2021-05-18 00:36:57 +08:00
|
|
|
_ebss = .; /* for init_ram() */
|
|
|
|
__bss_end__ = _ebss; /* for libc */
|
2021-05-11 16:12:06 +08:00
|
|
|
} > ram
|
|
|
|
|
2021-05-18 00:36:57 +08:00
|
|
|
. = ALIGN(8);
|
|
|
|
end = .; /* for syscalls.c */
|
|
|
|
_end = .; /* for cmsis_gcc.h and init_ram() */
|
|
|
|
__end__ = .; /* for libc */
|
2021-05-11 16:12:06 +08:00
|
|
|
}
|