2021-09-25 20:00:36 +02:00
|
|
|
MEMORY {
|
2022-01-22 13:03:05 +01:00
|
|
|
ram (rwx) : org = 0x00000000, len = 15k
|
|
|
|
buffer (rw) : org = 0x00003C00, len = 1k
|
2022-01-18 19:21:49 +01:00
|
|
|
rom (rx) : org = 0x10010000, len = 26k
|
2021-09-25 20:00:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ENTRY(reset_handler)
|
|
|
|
|
|
|
|
SECTIONS {
|
2021-11-16 22:37:48 +01:00
|
|
|
.text.reset_handler : {
|
|
|
|
*(.text.reset_handler)
|
|
|
|
} > rom
|
2021-09-25 20:00:36 +02:00
|
|
|
|
2021-11-16 22:37:48 +01:00
|
|
|
.text : {
|
|
|
|
_sitext = LOADADDR(.text);
|
|
|
|
. = ALIGN(4);
|
|
|
|
_stext = .;
|
|
|
|
*(.text .text.* .gnu.linkonce.t.*)
|
|
|
|
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
|
|
. = ALIGN(4);
|
|
|
|
_etext = .;
|
|
|
|
} > ram AT > rom
|
2021-09-25 20:00:36 +02:00
|
|
|
|
|
|
|
.data : {
|
2021-11-16 22:37:48 +01:00
|
|
|
_sidata = LOADADDR(.data);
|
|
|
|
. = ALIGN(4);
|
|
|
|
_sdata = .;
|
|
|
|
*(.data .data.* .gnu.linkonce.d.*)
|
|
|
|
. = ALIGN(4);
|
|
|
|
_ssdata = .;
|
|
|
|
*(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)
|
|
|
|
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
|
|
|
. = ALIGN(4);
|
|
|
|
_edata = .;
|
|
|
|
} > ram AT > rom
|
2021-09-25 20:00:36 +02:00
|
|
|
|
2021-11-16 22:37:48 +01:00
|
|
|
.bss : {
|
|
|
|
. = ALIGN(4);
|
|
|
|
_sbss = .;
|
|
|
|
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
2021-12-10 17:36:30 +01:00
|
|
|
*(.scommon .scommon.*)
|
2021-11-16 22:37:48 +01:00
|
|
|
*(.bss .bss.* .gnu.linkonce.b.*)
|
2021-09-25 20:00:36 +02:00
|
|
|
*(COMMON)
|
2021-11-16 22:37:48 +01:00
|
|
|
. = ALIGN(4);
|
|
|
|
_ebss = .;
|
|
|
|
} > ram
|
2021-09-25 20:00:36 +02:00
|
|
|
|
2022-01-20 20:28:59 +01:00
|
|
|
.buffer : {
|
|
|
|
*(.buffer)
|
|
|
|
} > buffer
|
|
|
|
|
2021-11-16 22:37:48 +01:00
|
|
|
__global_pointer$ = MIN(_ssdata + 0x800, MAX(_sdata + 0x800, _ebss - 0x800));
|
|
|
|
__stack_pointer$ = ORIGIN(ram) + LENGTH(ram);
|
2021-09-25 20:00:36 +02:00
|
|
|
}
|