mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-02-17 20:33:14 +01:00
149 lines
3.2 KiB
Plaintext
149 lines
3.2 KiB
Plaintext
/**************************************************************************//**
|
|
* @file system.ld
|
|
* @brief
|
|
* @version
|
|
* @date
|
|
*
|
|
* @note
|
|
* Copyright (C) 2010 NXP Semiconductors(NXP). All rights reserved.
|
|
*
|
|
* @par
|
|
* Software that is described herein is for illustrative purposes only
|
|
* which provides customers with programming information regarding the
|
|
* products. This software is supplied "AS IS" without any warranties.
|
|
* NXP Semiconductors assumes no responsibility or liability for the
|
|
* use of the software, conveys no license or title under any patent,
|
|
* copyright, or mask work right to the product. NXP Semiconductors
|
|
* reserves the right to make changes in the software without
|
|
* notification. NXP Semiconductors also make no representation or
|
|
* warranty that such application will be suitable for the specified
|
|
* use without further testing or modification.
|
|
******************************************************************************/
|
|
|
|
MEMORY
|
|
{
|
|
/* Define each memory region */
|
|
MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x80000 /* 512k */
|
|
RamLoc32 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x8000 /* 32k */
|
|
RamAHB32 (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x8000 /* 32k */
|
|
|
|
}
|
|
/* Define a symbol for the top of each memory region */
|
|
__top_MFlash512 = 0x0 + 0x80000;
|
|
__top_RamLoc32 = 0x10000000 + 0x8000;
|
|
__top_RamAHB32 = 0x2007c000 + 0x8000;
|
|
|
|
|
|
|
|
ENTRY(ResetISR)
|
|
|
|
SECTIONS
|
|
{
|
|
|
|
/* MAIN TEXT SECTION */
|
|
.text : ALIGN(4)
|
|
{
|
|
FILL(0xff)
|
|
KEEP(*(.isr_vector))
|
|
|
|
/* Global Section Table */
|
|
. = ALIGN(4) ;
|
|
__section_table_start = .;
|
|
__data_section_table = .;
|
|
LONG(LOADADDR(.data));
|
|
LONG( ADDR(.data)) ;
|
|
LONG( SIZEOF(.data));
|
|
LONG(LOADADDR(.data_RAM2));
|
|
LONG( ADDR(.data_RAM2)) ;
|
|
LONG( SIZEOF(.data_RAM2));
|
|
__data_section_table_end = .;
|
|
__bss_section_table = .;
|
|
LONG( ADDR(.bss));
|
|
LONG( SIZEOF(.bss));
|
|
LONG( ADDR(.bss_RAM2));
|
|
LONG( SIZEOF(.bss_RAM2));
|
|
__bss_section_table_end = .;
|
|
__section_table_end = . ;
|
|
/* End of Global Section Table */
|
|
|
|
|
|
*(.after_vectors*)
|
|
|
|
*(.text*)
|
|
*(.rodata .rodata.*)
|
|
. = ALIGN(4);
|
|
|
|
} > MFlash512
|
|
|
|
/*
|
|
* for exception handling/unwind - some Newlib functions (in common
|
|
* with C++ and STDC++) use this.
|
|
* Use KEEP so not discarded with --gc-sections
|
|
*/
|
|
.ARM.extab : ALIGN(4)
|
|
{
|
|
KEEP(*(.ARM.extab* .gnu.linkonce.armextab.*))
|
|
} > MFlash512
|
|
__exidx_start = .;
|
|
|
|
.ARM.exidx : ALIGN(4)
|
|
{
|
|
KEEP(*(.ARM.exidx* .gnu.linkonce.armexidx.*))
|
|
} > MFlash512
|
|
__exidx_end = .;
|
|
|
|
_etext = .;
|
|
|
|
|
|
.data_RAM2 : ALIGN(4)
|
|
{
|
|
FILL(0xff)
|
|
*(.data.$RAM2*)
|
|
*(.data.$RamAHB32*)
|
|
. = ALIGN(4) ;
|
|
} > RamAHB32 AT>MFlash512
|
|
|
|
/* MAIN DATA SECTION */
|
|
|
|
.uninit_RESERVED : ALIGN(4)
|
|
{
|
|
KEEP(*(.bss.$RESERVED*))
|
|
. = ALIGN(4) ;
|
|
_end_uninit_RESERVED = .;
|
|
} > RamLoc32
|
|
|
|
.data : ALIGN(4)
|
|
{
|
|
FILL(0xff)
|
|
_data = .;
|
|
*(vtable)
|
|
*(.data*)
|
|
. = ALIGN(4) ;
|
|
_edata = .;
|
|
} > RamLoc32 AT>MFlash512
|
|
|
|
|
|
.bss_RAM2 : ALIGN(4)
|
|
{
|
|
*(.bss.$RAM2*)
|
|
*(.bss.$RamAHB32*)
|
|
. = ALIGN(4) ;
|
|
} > RamAHB32
|
|
|
|
/* MAIN BSS SECTION */
|
|
.bss : ALIGN(4)
|
|
{
|
|
__bss_start__ = . ;
|
|
_bss = .;
|
|
*(.bss*)
|
|
*(COMMON)
|
|
. = ALIGN(4) ;
|
|
__bss_end__ = . ;
|
|
_ebss = .;
|
|
PROVIDE(end = .);
|
|
} > RamLoc32
|
|
|
|
PROVIDE(_pvHeapStart = .);
|
|
PROVIDE(_vStackTop = __top_RamLoc32 - 0);
|
|
}
|