2021-11-07 13:41:32 +07:00
|
|
|
ENTRY(Reset_Handler)
|
|
|
|
|
|
|
|
_estack = 0x20008000; /* end of RAM */
|
|
|
|
/* Generate a link error if heap and stack don't fit into RAM */
|
|
|
|
_Min_Heap_Size = 0; /* required amount of heap */
|
|
|
|
_Min_Stack_Size = 0x1000; /* required amount of stack */
|
|
|
|
|
|
|
|
|
2023-03-17 16:12:49 +07:00
|
|
|
MEMORY
|
2021-11-07 13:41:32 +07:00
|
|
|
{
|
|
|
|
FLASH(rx) : ORIGIN = 0x00000000, LENGTH = 256K
|
|
|
|
SRAM(rwx) : ORIGIN = 0x20000000, LENGTH = 32K
|
|
|
|
}
|
|
|
|
|
2023-03-17 16:12:49 +07:00
|
|
|
SECTIONS
|
2021-11-07 13:41:32 +07:00
|
|
|
{
|
2023-03-17 16:12:49 +07:00
|
|
|
.text :
|
2021-11-07 13:41:32 +07:00
|
|
|
{
|
|
|
|
. = ALIGN(4) ;
|
2023-03-17 16:12:49 +07:00
|
|
|
*(.vectors)
|
|
|
|
*(.text)
|
2021-11-07 13:41:32 +07:00
|
|
|
*(.text.*)
|
|
|
|
*(.init)
|
|
|
|
*(.fini)
|
|
|
|
*(.rodata)
|
|
|
|
*(.rodata.*)
|
2023-03-17 16:12:49 +07:00
|
|
|
. = ALIGN(4) ;
|
|
|
|
__end_text = . ;
|
2021-11-07 13:41:32 +07:00
|
|
|
} >FLASH
|
2023-03-17 16:12:49 +07:00
|
|
|
|
2021-11-07 13:41:32 +07:00
|
|
|
.data : AT(ADDR(.text) + SIZEOF(.text))
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
2023-03-17 16:12:49 +07:00
|
|
|
__start_data = . ;
|
2021-11-07 13:41:32 +07:00
|
|
|
__la_data = LOADADDR(.data);
|
2023-03-17 16:12:49 +07:00
|
|
|
*(.data)
|
2021-11-07 13:41:32 +07:00
|
|
|
*(.data.*)
|
|
|
|
. = ALIGN(4);
|
2023-03-17 16:12:49 +07:00
|
|
|
__end_data = . ;
|
2021-11-07 13:41:32 +07:00
|
|
|
|
|
|
|
} >SRAM
|
|
|
|
|
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
. = ALIGN(4) ;
|
|
|
|
__start_bss = . ;
|
|
|
|
__bss_start__ = __start_bss;
|
|
|
|
*(.bss)
|
|
|
|
*(.bss.*)
|
2023-03-17 16:12:49 +07:00
|
|
|
*(.COMMON)
|
2021-11-07 13:41:32 +07:00
|
|
|
__end_bss = . ;
|
|
|
|
. = ALIGN(4);
|
|
|
|
}>SRAM
|
|
|
|
|
|
|
|
/* User_heap_stack section, used to check that there is enough RAM left */
|
|
|
|
._user_heap_stack :
|
|
|
|
{
|
|
|
|
. = ALIGN(8);
|
|
|
|
PROVIDE ( end = . );
|
|
|
|
PROVIDE ( _end = . );
|
|
|
|
. = . + _Min_Heap_Size;
|
|
|
|
. = . + _Min_Stack_Size;
|
|
|
|
. = ALIGN(8);
|
|
|
|
} >SRAM
|
|
|
|
}
|