forked from len0rd/rockbox
Linker script for gmini targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5890 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4338f9c885
commit
dd4ea29f01
2 changed files with 98 additions and 2 deletions
|
@ -10,6 +10,81 @@ OUTPUT_FORMAT(elf32-sh)
|
||||||
#endif
|
#endif
|
||||||
INPUT(crt0.o)
|
INPUT(crt0.o)
|
||||||
|
|
||||||
|
#if CONFIG_CPU == TCC730
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FIRMWARE : ORIGIN = LOADADDRESS, LENGTH = 256K
|
||||||
|
FLASH (RX) : ORIGIN = 0x000000, LENGTH = 1024K
|
||||||
|
ICMEM (RX) : ORIGIN = 0x3FC000, LENGTH = 32K
|
||||||
|
IMEM1 : ORIGIN = 0x200000, LENGTH = 32K
|
||||||
|
IMEM2 : ORIGIN = 0x210000, LENGTH = 32K
|
||||||
|
IMEM3 : ORIGIN = 0x220000, LENGTH = 16K
|
||||||
|
IMEM4 : ORIGIN = 0x230000, LENGTH = 16K
|
||||||
|
|
||||||
|
DRAM : ORIGIN = 0x000000, LENGTH = 0x3F0000
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
.text LOADADDRESS : {
|
||||||
|
*(.init.text)
|
||||||
|
*(.text)
|
||||||
|
*(.icode) /* We don't put it in ICMEM coz crt1 uses LCD (now)*/
|
||||||
|
}> FLASH AT> FIRMWARE
|
||||||
|
|
||||||
|
.icode 0x3FC040: {
|
||||||
|
*(.vectors)
|
||||||
|
}> ICMEM AT> FIRMWARE
|
||||||
|
|
||||||
|
|
||||||
|
.data 0x2000: {
|
||||||
|
*(.data)
|
||||||
|
. = ALIGN(2);
|
||||||
|
*(.rodata)
|
||||||
|
. = ALIGN(2);
|
||||||
|
*(.rodata.str1.2)
|
||||||
|
. = ALIGN(2);
|
||||||
|
}> DRAM AT> FIRMWARE
|
||||||
|
|
||||||
|
.bss ALIGN(2) : {
|
||||||
|
*(.bss)
|
||||||
|
. = ALIGN(2);
|
||||||
|
}> DRAM
|
||||||
|
|
||||||
|
.stack ALIGN(2) : {
|
||||||
|
. = . + 0x2000;
|
||||||
|
}> DRAM
|
||||||
|
|
||||||
|
.idata 0x200000: {
|
||||||
|
*(.idata)
|
||||||
|
}> DRAM
|
||||||
|
|
||||||
|
|
||||||
|
_codesize = SIZEOF(.text);
|
||||||
|
|
||||||
|
_icodecopy = LOADADDR(.icode);
|
||||||
|
_icodestart = ADDR(.icode);
|
||||||
|
_icodesize = SIZEOF(.icode);
|
||||||
|
|
||||||
|
_datacopy = LOADADDR(.data);
|
||||||
|
_datastart = ADDR(.data);
|
||||||
|
_datasize = SIZEOF(.data);
|
||||||
|
|
||||||
|
|
||||||
|
_bssstart = ADDR(.bss);
|
||||||
|
_bsssize = (SIZEOF(.bss) + 1) & ~ 1;
|
||||||
|
|
||||||
|
_stackbegin = ADDR(.stack);
|
||||||
|
_stackend = ADDR(.stack) + SIZEOF(.stack);
|
||||||
|
|
||||||
|
_idatastart = ADDR(.idata);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define PLUGINSIZE 0x8000
|
#define PLUGINSIZE 0x8000
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -123,3 +198,5 @@ SECTIONS
|
||||||
pluginbuf = .;
|
pluginbuf = .;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
23
tools/configure
vendored
23
tools/configure
vendored
|
@ -35,7 +35,7 @@ calmrisccc () {
|
||||||
AR=calmrisc16-unknown-elf-ar
|
AR=calmrisc16-unknown-elf-ar
|
||||||
AS=calmrisc16-unknown-elf-as
|
AS=calmrisc16-unknown-elf-as
|
||||||
OC=calmrisc16-unknown-elf-objcopy
|
OC=calmrisc16-unknown-elf-objcopy
|
||||||
GCCOPTS="$CCOPTS"
|
GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
|
||||||
GCCOPTIMIZE="-fomit-frame-pointer"
|
GCCOPTIMIZE="-fomit-frame-pointer"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,22 @@ coldfirecc () {
|
||||||
GCCOPTIMIZE="-fomit-frame-pointer"
|
GCCOPTIMIZE="-fomit-frame-pointer"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
whichaddr () {
|
||||||
|
case $archos in
|
||||||
|
gmini120)
|
||||||
|
echo ""
|
||||||
|
echo "Where do you want the firmware to be flashed?"
|
||||||
|
echo "WARNING: Do not answer this question lightly,"
|
||||||
|
echo "unless you don't plan to flash your gmini."
|
||||||
|
echo "In this case, reply '0x10000' (no quotes) and "
|
||||||
|
echo "re-configure when you know better."
|
||||||
|
loadaddress=`input`
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
whichsim () {
|
whichsim () {
|
||||||
|
|
||||||
if [ -z "$simver" ]; then
|
if [ -z "$simver" ]; then
|
||||||
|
@ -315,7 +331,7 @@ if [ -z "$archos" ]; then
|
||||||
|
|
||||||
5)
|
5)
|
||||||
archos="gmini120"
|
archos="gmini120"
|
||||||
target="-DARCHOS_GMINI120"
|
target="-DARCHOS_GMINI120 -DLOADADDRESS=\$(LOADADDRESS)"
|
||||||
memory=16 # fixed size (16 is a guess, remove comment when checked)
|
memory=16 # fixed size (16 is a guess, remove comment when checked)
|
||||||
calmrisccc
|
calmrisccc
|
||||||
tool="$rootdir/tools/scramble" # not correct but...
|
tool="$rootdir/tools/scramble" # not correct but...
|
||||||
|
@ -439,6 +455,7 @@ if [ -z "$debug" ]; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
whichaddr
|
||||||
|
|
||||||
if [ -z "$language" ]; then
|
if [ -z "$language" ]; then
|
||||||
|
|
||||||
|
@ -480,6 +497,7 @@ sed > Makefile \
|
||||||
-e "s,@FLASHFILE@,${flash},g" \
|
-e "s,@FLASHFILE@,${flash},g" \
|
||||||
-e "s,@PLUGINS@,${plugins},g" \
|
-e "s,@PLUGINS@,${plugins},g" \
|
||||||
-e "s,@GCCOPTS@,${GCCOPTS},g" \
|
-e "s,@GCCOPTS@,${GCCOPTS},g" \
|
||||||
|
-e "s,@LOADADDRESS@,${loadaddress},g" \
|
||||||
-e "s,@EXTRADEF@,${extradefines},g" \
|
-e "s,@EXTRADEF@,${extradefines},g" \
|
||||||
-e "s,@APPSDIR@,${appsdir},g" \
|
-e "s,@APPSDIR@,${appsdir},g" \
|
||||||
<<EOF
|
<<EOF
|
||||||
|
@ -510,6 +528,7 @@ export AR=@AR@
|
||||||
export AS=@AS@
|
export AS=@AS@
|
||||||
export OC=@OC@
|
export OC=@OC@
|
||||||
export GCCOPTS=@GCCOPTS@
|
export GCCOPTS=@GCCOPTS@
|
||||||
|
export LOADADDRESS=@LOADADDRESS@
|
||||||
|
|
||||||
.PHONY: all clean tags zip
|
.PHONY: all clean tags zip
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue