2021-03-12 10:03:03 +00:00
|
|
|
/* GNU linker script for STM32F405 */
|
2014-04-12 13:07:45 +01:00
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x100000 /* entire flash, 1 MiB */
|
|
|
|
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
|
|
|
|
}
|
2017-07-19 04:12:10 +01:00
|
|
|
|
2014-04-12 13:07:45 +01:00
|
|
|
_estack = ORIGIN(RAM) + LENGTH(RAM);
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.isr_vector :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
KEEP(*(.isr_vector))
|
2014-04-12 13:07:45 +01:00
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
} >FLASH
|
2017-07-19 04:12:10 +01:00
|
|
|
|
2014-04-12 13:07:45 +01:00
|
|
|
.text :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
*(.text)
|
|
|
|
*(.text*)
|
|
|
|
*(.rodata)
|
|
|
|
*(.rodata*)
|
2014-04-12 13:07:45 +01:00
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
_etext = .;
|
|
|
|
_sidata = _etext;
|
2014-04-12 13:07:45 +01:00
|
|
|
} >FLASH
|
|
|
|
|
|
|
|
.data : AT ( _sidata )
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
_sdata = .;
|
|
|
|
*(.data)
|
|
|
|
*(.data*)
|
2014-04-12 13:07:45 +01:00
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
_edata = .;
|
2014-04-12 13:07:45 +01:00
|
|
|
} >RAM
|
2017-07-19 04:12:10 +01:00
|
|
|
|
2014-04-12 13:07:45 +01:00
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
_sbss = .;
|
2014-04-12 13:07:45 +01:00
|
|
|
*(.bss)
|
|
|
|
*(.bss*)
|
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(4);
|
2021-03-12 10:03:03 +00:00
|
|
|
_ebss = .;
|
2014-04-12 13:07:45 +01:00
|
|
|
} >RAM
|
|
|
|
|
|
|
|
.heap :
|
|
|
|
{
|
2021-03-12 10:03:03 +00:00
|
|
|
. = ALIGN(8);
|
|
|
|
_heap_start = .;
|
2014-04-12 13:07:45 +01:00
|
|
|
} >RAM
|
|
|
|
}
|