Files
zTC1/mico-os/platform/MCU/LPC5410x/GCC/app_with_bootloader.ld

162 lines
4.1 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.
*
*/
Reset_Handler = _start;
ENTRY( _start );
/* Include memory map */
INCLUDE memory.ld
SECTIONS
{
.vectors :
{
link_interrupt_vectors_location = .;
KEEP(*(*.interrupt_vector_table))
}>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 = .;
wifi_firmware_image_location = .;
*(.rodata.wifi_firmware_image)
wifi_firmware_image_end = .;
. = ALIGN(0x4);
*(.rodata.wifi_nvram_image)
*(.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
.stack : /* Contains the initial stack */
{
link_stack_location = ALIGN(., 4);
*(.stack)
. = ALIGN(MAX(link_stack_location + __STACKSIZE__ , .), 4);
link_stack_end = .;
}> 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*)
}
}
/* Declare libc Heap to start at end of allocated RAM */
PROVIDE( _heap = link_stack_end );
/* End of the heap is top of RAM, aligned 8 byte */
PROVIDE( _eheap = ALIGN( ORIGIN( SRAM ) + LENGTH( SRAM ) - 8, 8 ) );