Files
zTC1/mico-os/platform/MCU/MX1290/GCC/app_with_moc.ld
2025-03-11 15:54:45 +08:00

142 lines
3.5 KiB
Plaintext

/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
*
*/
ENTRY( moc_app_main );
MEMORY
{
APP_FLASH (rx) : ORIGIN = 0x08088000, LENGTH = 256K
SRAM (rwx) : ORIGIN = 0x10030000, LENGTH = 56K
}
SECTIONS
{
.vectors :
{
. = ALIGN(4);
KEEP(*(*.user_handler))
. = ALIGN(., 4);
}>APP_FLASH AT> APP_FLASH
.text :
{
. = ALIGN(4);
link_code_location = .;
KEEP(*(.text.irq ))
*(.text .text.* .gnu.linkonce.t.*)
link_code_end = .;
. = ALIGN(0x4);
link_const_variable_data_location = .;
*(.rodata .rodata.* .gnu.linkonce.r.*)
link_const_variable_data_end = .;
. = ALIGN(0x4);
link_constructors_location = .;
KEEP(*(.preinit_array))
KEEP(*(.init_array))
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*crtend.o(.ctors))
link_constructors_end = .;
. = ALIGN(0x4);
link_destructors_location = .;
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*crtend.o(.dtors))
link_destructors_end = .;
. = ALIGN(16);
}>APP_FLASH AT> APP_FLASH
/*
* The .ARM.exidx and .ARM.extab sections are used for C++ exception handling.
* It is located here for completeness. Bare-metal ARM projects
* typically cannot afford the overhead associated with C++
* exceptions handling.
*/
.ARM.exidx :
{
__exidx_start = ALIGN(4);
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
__exidx_end = .;
} > APP_FLASH AT> APP_FLASH
.ARM.extab :
{
__extab_start = ALIGN(4);
*(.ARM.extab*)
__extab_end = .;
} > APP_FLASH AT> APP_FLASH
.fast : /* This section contains code that is run from RAM after being loaded from flash - functions can be put in this section with the C attribute: __attribute__ ((section (".fast"))) */
{
link_run_from_ram_code_flash_location = LOADADDR( .fast ); /* This is the location in flash of the code */
link_run_from_ram_code_ram_location = .;
*(.fast .fast.* .text.fastcode)
link_run_from_ram_code_ram_end = .;
}> SRAM AT> APP_FLASH
.data : /* Contains the non-zero initialised global variables */
{
link_global_data_initial_values = LOADADDR( .data ); /* This is the location in flash of the initial values of global variables */
link_global_data_start = .;
*(.data*)
link_global_data_end = .;
. = ALIGN(., 4);
}> SRAM AT> APP_FLASH
.bss : /* Zero initialised memory used for zero initialised variables */
{
link_bss_location = ALIGN(., 4);
*(.bss*)
*(COMMON)
link_bss_end = .;
. = ALIGN(., 4);
}> SRAM AT> SRAM
/DISCARD/ :
{
*(.ARM.attributes*)
*(.comment)
*(.init)
*(.preinit)
*(.fini)
*(.fini_array)
*(.ARM.exidx*)
*(.gnu.linkonce.armexidx.*)
*(.eh_frame_hdr)
*(.eh_frame)
*(.gnu.linkonce.armextab.*)
*(.v4_bx)
*(.vfp11_veneer)
*(.gcc_except_table)
*(.eh_frame_hdr)
*(.eh_frame)
*(.glue*)
}
_ram_end_ = ORIGIN(SRAM) + LENGTH(SRAM);
}