mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-27 16:17:05 +08:00
1. 新增 crypto, onchip_Flash, soft_i2c 驱动 2. 新增 oneshot 配网功能 3. 完善 I2C, UART, SPI, WIFI 等基本驱动 4. 更新 Kconfig 配置,用户交互更加友好 5. 屏蔽 末尾 80 内存,无法作为栈使用。
179 lines
4.0 KiB
Plaintext
179 lines
4.0 KiB
Plaintext
/* Linker script to configure memory regions.
|
|
* Need modifying for a specific board.
|
|
* FLASH.ORIGIN: starting address of flash
|
|
* FLASH.LENGTH: length of flash
|
|
* RAM.ORIGIN: starting address of RAM bank 0
|
|
* RAM.LENGTH: length of RAM bank 0
|
|
*/
|
|
|
|
MEMORY
|
|
{
|
|
FLASH (rx) : ORIGIN = 0x8010100, LENGTH = 959K /* 960K-256B */
|
|
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 0x28000 /* 160K */
|
|
}
|
|
|
|
/* Linker script to place sections and symbol values. Should be used together
|
|
* with other linker script that defines memory regions FLASH and RAM.
|
|
* It references following symbols, which must be defined in code:
|
|
* Reset_Handler : Entry of reset handler
|
|
*
|
|
* It defines following symbols, which code can use without definition:
|
|
* __exidx_start
|
|
* __exidx_end
|
|
* __copy_table_start__
|
|
* __copy_table_end__
|
|
* __zero_table_start__
|
|
* __zero_table_end__
|
|
* __etext
|
|
* __data_start__
|
|
* __preinit_array_start
|
|
* __preinit_array_end
|
|
* __init_array_start
|
|
* __init_array_end
|
|
* __fini_array_start
|
|
* __fini_array_end
|
|
* __data_end__
|
|
* __bss_start__
|
|
* __bss_end__
|
|
* __end__
|
|
* end
|
|
* __HeapLimit
|
|
* __StackLimit
|
|
* __StackTop
|
|
* __stack
|
|
*/
|
|
ENTRY(Reset_Handler)
|
|
|
|
SECTIONS
|
|
{
|
|
.text :
|
|
{
|
|
. = ALIGN(4);
|
|
_stext = .;
|
|
KEEP(*(.isr_vector))
|
|
. = ALIGN(4);
|
|
|
|
*(.text) /* remaining code */
|
|
*(.text.*) /* remaining code */
|
|
*(.rodata) /* read-only data (constants) */
|
|
*(.rodata*)
|
|
*(.glue_7)
|
|
*(.glue_7t)
|
|
*(.gnu.linkonce.t*)
|
|
|
|
/* section information for finsh shell */
|
|
. = ALIGN(4);
|
|
__fsymtab_start = .;
|
|
KEEP(*(FSymTab))
|
|
__fsymtab_end = .;
|
|
|
|
. = ALIGN(4);
|
|
__vsymtab_start = .;
|
|
KEEP(*(VSymTab))
|
|
__vsymtab_end = .;
|
|
|
|
/* section information for initial. */
|
|
. = ALIGN(4);
|
|
__rt_init_start = .;
|
|
KEEP(*(SORT(.rti_fn*)))
|
|
__rt_init_end = .;
|
|
|
|
. = ALIGN(4);
|
|
__rtatcmdtab_start = .;
|
|
KEEP(*(RtAtCmdTab))
|
|
__rtatcmdtab_end = .;
|
|
. = ALIGN(4);
|
|
|
|
. = ALIGN(4);
|
|
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 = .;
|
|
|
|
__etext = .;
|
|
|
|
.data : AT (__etext)
|
|
{
|
|
. = ALIGN(4);
|
|
__data_start__ = .;
|
|
*(vtable)
|
|
*(.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
|
|
|
|
.stack_dummy (COPY):
|
|
{
|
|
. = ALIGN(8);
|
|
__stack_start__ = .;
|
|
*(.stack*)
|
|
__stack_end__ = .;
|
|
} > RAM
|
|
|
|
.bss __stack_end__ :
|
|
{
|
|
. = ALIGN(4);
|
|
__bss_start__ = .;
|
|
*(.bss*)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
__bss_end__ = .;
|
|
} > RAM
|
|
|
|
ASSERT(__StackTop <= 0x20028000, "stack address error")
|
|
}
|