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