Content originally posted in LPCWare by jasonliao on Fri Oct 08 06:41:03 MST 2010
[FONT=Arial][SIZE=2]my linkscript as below:[/SIZE][/FONT]
[FONT=Arial][SIZE=2][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]GROUP(libcr_nohost.a libcr_c.a libcr_eabihelpers.a)[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]MEMORY
{
/* Define each memory region */
MFlash512 (rx) : ORIGIN = 0x0, LENGTH = 0x80000 /* 512k */
RamLoc32 (rwx) : ORIGIN = 0x10000000, LENGTH = 0x8000 /* 32k */
AHBRAM0 (rwx) : ORIGIN = 0x2007c000, LENGTH = 0x4000
AHBRAM1 (rwx) : ORIGIN = 0x20080000, LENGTH = 0x4000
CANAccFilterRAM (rwx) : ORIGIN = 0x40038000, LENGTH = 0x800 /* 2k */[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]}
/* Define a symbol for the top of each memory region */
__top_MFlash512 = 0x0 + 0x80000;
__top_RamLoc32 = 0x10000000 + 0x8000;
__top_AHBRAM0 = 0x2007c000 + 0x4000;
__top_AHBRAM1 = 0x20080000 + 0x4000;
__top_CANAccFilterRAM = 0x40038000 + 0x800;[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]ENTRY(ResetISR)[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]SECTIONS
{
.text :
{
KEEP(*(.isr_vector))
*(.text*)
*(.rodata*)[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] } > MFlash512[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue]
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > MFlash512[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] __exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > MFlash512
__exidx_end = .;[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] _etext = .;
.data :
{
_data = .;
*(vtable)
*(.data*)
_edata = .;
} > RamLoc32 AT>MFlash512[/COLOR][/SIZE][/FONT]
[FONT=Arial Narrow][SIZE=2][COLOR=blue] /* zero initialized data */
.bss :
{
_bss = .;
*(.bss*)
*(COMMON)
_ebss = .;
} > RamLoc32
/* Where we put the heap with cr_clib */
.cr_heap :
{
end = .;
_pvHeapStart = .;
} > RamLoc32
_vRamTop = __top_RamLoc32 ;
_vStackTop = _vRamTop - 16;
.AHB1 :
{
*(.AHB1*)
} > AHBRAM1
.AHB0 :
{
*(.AHB0*)
} > AHBRAM0
}
[/COLOR][/SIZE][/FONT]