rearranged linker script to relocate BaS code to target RAM address

This commit is contained in:
Markus Fröschle
2012-10-18 11:42:16 +00:00
parent 9be86515a0
commit 038765bbf2

View File

@@ -1,6 +1,6 @@
ENTRY(_startup);
MEMORY { MEMORY {
code (RX) : ORIGIN = 0xE0000000, LENGTH = 0x00200000 flash (RX) : ORIGIN = 0xE0000000, LENGTH = 0xFFFFFFFF
ram (WX) : ORIGIN = 0x1FE00000, LENGTH = 0x00100000 /* target to copy BaS to */
} }
SECTIONS { SECTIONS {
@@ -33,8 +33,9 @@ SECTIONS {
__RAMBAR1 = ABSOLUTE(0xFF101000); __RAMBAR1 = ABSOLUTE(0xFF101000);
__RAMBAR1_SIZE = ABSOLUTE(0x00001000); __RAMBAR1_SIZE = ABSOLUTE(0x00001000);
/* Systemveriablem:****************************************** */ /* system variables */
/* RAMBAR0 0 bis 0x7FF -> exception vectoren */
/* RAMBAR0 0 to 0x7FF -> exception vectors */
_rt_mod = __RAMBAR0 + 0x800; _rt_mod = __RAMBAR0 + 0x800;
_rt_ssp = __RAMBAR0 + 0x804; _rt_ssp = __RAMBAR0 + 0x804;
_rt_usp = __RAMBAR0 + 0x808; _rt_usp = __RAMBAR0 + 0x808;
@@ -53,20 +54,19 @@ SECTIONS {
_video_sbt = __RAMBAR0 + 0x83C; _video_sbt = __RAMBAR0 + 0x83C;
_rt_mbar = __RAMBAR0 + 0x844; /* (c)0f */ _rt_mbar = __RAMBAR0 + 0x844; /* (c)0f */
/**********************************************************/ /* 32KB on-chip System SRAM */
/* 32KB on-chip System SRAM */
__SYS_SRAM = ABSOLUTE(0xFF010000); __SYS_SRAM = ABSOLUTE(0xFF010000);
__SYS_SRAM_SIZE = ABSOLUTE(0x00008000); __SYS_SRAM_SIZE = ABSOLUTE(0x00008000);
.code : {} > code .code ___BOOT_FLASH :
{
objs/startcf.o
} > flash
.text : .text :
{ {
objs/startcf.o(.text)
objs/sysinit.o(.text) objs/sysinit.o(.text)
objs/init_fpga.o(.text) objs/init_fpga.o(.text)
objs/BaS.o(.text)
objs/sd_card.o(.text) objs/sd_card.o(.text)
objs/cache.o(.text) objs/cache.o(.text)
objs/mmu.o(.text) objs/mmu.o(.text)
@@ -74,6 +74,12 @@ SECTIONS {
objs/supervisor.o(.text) objs/supervisor.o(.text)
objs/ewf.o(.text) objs/ewf.o(.text)
objs/illegal_instruction.o(.text) objs/illegal_instruction.o(.text)
objs/last.o(.text) _bas = .;
} > code } > flash
.bas _Bas_base : AT (ADDR(.text) + SIZEOF(.text))
{
objs/BaS.o(.text)
_bas_length = . - _BaS;
} > ram
} }