You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.0 KiB
100 lines
2.0 KiB
/* Linker script for ST STM32F429IDISCOVERY (STM32F429ZI, 2048K flash, 256K RAM). */
|
|
|
|
/* Define memory regions. */
|
|
MEMORY
|
|
{
|
|
rom (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
|
|
ccm (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
|
|
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
|
|
}
|
|
|
|
/* Enforce emmition of the vector table. */
|
|
EXTERN (vector_table)
|
|
|
|
/* Define the entry point of the output file. */
|
|
ENTRY(reset_handler)
|
|
|
|
/* Define sections. */
|
|
SECTIONS
|
|
{
|
|
.text : {
|
|
*(.vectors) /* Vector table */
|
|
*(.text*) /* Program code */
|
|
. = ALIGN(4);
|
|
*(.rodata*) /* Read-only data */
|
|
. = ALIGN(4);
|
|
} >rom
|
|
|
|
/* C++ Static constructors/destructors, also used for __attribute__
|
|
* ((constructor)) and the likes */
|
|
.preinit_array : {
|
|
. = ALIGN(4);
|
|
__preinit_array_start = .;
|
|
KEEP (*(.preinit_array))
|
|
__preinit_array_end = .;
|
|
} >rom
|
|
.init_array : {
|
|
. = ALIGN(4);
|
|
__init_array_start = .;
|
|
KEEP (*(SORT(.init_array.*)))
|
|
KEEP (*(.init_array))
|
|
__init_array_end = .;
|
|
} >rom
|
|
.fini_array : {
|
|
. = ALIGN(4);
|
|
__fini_array_start = .;
|
|
KEEP (*(.fini_array))
|
|
KEEP (*(SORT(.fini_array.*)))
|
|
__fini_array_end = .;
|
|
} >rom
|
|
|
|
.con_boot_cmd : {
|
|
. = ALIGN(0x4);
|
|
__con_cmd_start = .;
|
|
KEEP(*(SORT(.con_cmd)))
|
|
__con_cmd_end = .;
|
|
} > rom
|
|
|
|
/*
|
|
* Another section used by C++ stuff, appears when using newlib with
|
|
* 64bit (long long) printf support
|
|
*/
|
|
.ARM.extab : {
|
|
*(.ARM.extab*)
|
|
} >rom
|
|
.ARM.exidx : {
|
|
__exidx_start = .;
|
|
*(.ARM.exidx*)
|
|
__exidx_end = .;
|
|
} >rom
|
|
|
|
. = ALIGN(4);
|
|
_etext = .;
|
|
|
|
.data : {
|
|
_data = .;
|
|
*(.data*) /* Read-write initialized data */
|
|
. = ALIGN(4);
|
|
_edata = .;
|
|
} >ram AT >rom
|
|
_data_loadaddr = LOADADDR(.data);
|
|
|
|
.bss : {
|
|
*(.bss*) /* Read-write zero initialized data */
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
_ebss = .;
|
|
} >ram
|
|
|
|
/*
|
|
* The .eh_frame section appears to be used for C++ exception handling.
|
|
* You may need to fix this if you're using C++.
|
|
*/
|
|
/DISCARD/ : { *(.eh_frame) }
|
|
|
|
. = ALIGN(4);
|
|
end = .;
|
|
}
|
|
|
|
PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram));
|
|
|
|
|