mirror of
https://github.com/candle-usb/candleLight_fw.git
synced 2025-01-14 05:42:53 +08:00
d306798923
Specifically, the STM32F407VE. Even more specifically, [this](https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0.html) dev board
152 lines
2.6 KiB
Plaintext
152 lines
2.6 KiB
Plaintext
__STACK_SIZE = 32K;
|
|
__HEAP_SIZE = 64K;
|
|
|
|
__FLASH_SIZE = 512K;
|
|
__NVM_SIZE = 128K;
|
|
|
|
MEMORY
|
|
{
|
|
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = __FLASH_SIZE - __NVM_SIZE
|
|
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
|
|
DATA (xrw) : ORIGIN = 0x08000000 + __FLASH_SIZE - __NVM_SIZE, LENGTH = __NVM_SIZE
|
|
}
|
|
|
|
|
|
ENTRY(Reset_Handler)
|
|
|
|
SECTIONS
|
|
{
|
|
.text :
|
|
{
|
|
KEEP(*(.vectors))
|
|
*(.text*)
|
|
|
|
KEEP(*(.init))
|
|
KEEP(*(.fini))
|
|
|
|
/* .ctors */
|
|
*crtbegin.o(.ctors)
|
|
*crtbegin?.o(.ctors)
|
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
|
*(SORT(.ctors.*))
|
|
*(.ctors)
|
|
|
|
/* .dtors */
|
|
*crtbegin.o(.dtors)
|
|
*crtbegin?.o(.dtors)
|
|
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
|
*(SORT(.dtors.*))
|
|
*(.dtors)
|
|
|
|
*(.rodata*)
|
|
|
|
KEEP(*(.eh_frame*))
|
|
} > FLASH
|
|
|
|
.ARM.extab :
|
|
{
|
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
|
} > FLASH
|
|
|
|
__exidx_start = .;
|
|
.ARM.exidx :
|
|
{
|
|
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
|
} > FLASH
|
|
__exidx_end = .;
|
|
|
|
.copy.table :
|
|
{
|
|
. = ALIGN(4);
|
|
__copy_table_start__ = .;
|
|
LONG (__etext)
|
|
LONG (__data_start__)
|
|
LONG (__data_end__ - __data_start__)
|
|
__copy_table_end__ = .;
|
|
} > FLASH
|
|
|
|
.zero.table :
|
|
{
|
|
. = ALIGN(4);
|
|
__zero_table_start__ = .;
|
|
__zero_table_end__ = .;
|
|
} > FLASH
|
|
|
|
__etext = ALIGN (4);
|
|
|
|
.user_data :
|
|
{
|
|
. = ALIGN(4);
|
|
*(.user_data)
|
|
. = ALIGN(4);
|
|
} > DATA
|
|
|
|
.data : AT (__etext)
|
|
{
|
|
__data_start__ = .;
|
|
*(vtable)
|
|
*(.data)
|
|
*(.data.*)
|
|
|
|
. = ALIGN(4);
|
|
/* preinit data */
|
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
|
KEEP(*(.preinit_array))
|
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
|
|
|
. = ALIGN(4);
|
|
/* init data */
|
|
PROVIDE_HIDDEN (__init_array_start = .);
|
|
KEEP(*(SORT(.init_array.*)))
|
|
KEEP(*(.init_array))
|
|
PROVIDE_HIDDEN (__init_array_end = .);
|
|
|
|
|
|
. = ALIGN(4);
|
|
/* finit data */
|
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
|
KEEP(*(SORT(.fini_array.*)))
|
|
KEEP(*(.fini_array))
|
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
|
|
|
KEEP(*(.jcr*))
|
|
. = ALIGN(4);
|
|
/* All data end */
|
|
__data_end__ = .;
|
|
|
|
} > RAM
|
|
|
|
.bss :
|
|
{
|
|
. = ALIGN(4);
|
|
__bss_start__ = .;
|
|
*(.bss)
|
|
*(.bss.*)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
__bss_end__ = .;
|
|
} > RAM AT > RAM
|
|
|
|
.heap (COPY) :
|
|
{
|
|
. = ALIGN(8);
|
|
__end__ = .;
|
|
PROVIDE(end = .);
|
|
. = . + __HEAP_SIZE;
|
|
. = ALIGN(8);
|
|
__HeapLimit = .;
|
|
} > RAM
|
|
|
|
.stack (ORIGIN(RAM) + LENGTH(RAM) - __STACK_SIZE) (COPY) :
|
|
{
|
|
. = ALIGN(8);
|
|
__StackLimit = .;
|
|
. = . + __STACK_SIZE;
|
|
. = ALIGN(8);
|
|
__StackTop = .;
|
|
} > RAM
|
|
PROVIDE(__stack = __StackTop);
|
|
|
|
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
|
}
|