summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-10 22:37:09 +0000
committerJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-02-10 22:37:09 +0000
commitdd4ea29f015bdcdf3b009f10a9f155eb5f7a93e6 (patch)
treee86c3bd8733d29e8e24530c8bb3845748a1a9363
parent4338f9c88598ef52f1c06572efd1c82f5621998f (diff)
downloadrockbox-dd4ea29f015bdcdf3b009f10a9f155eb5f7a93e6.tar.gz
rockbox-dd4ea29f015bdcdf3b009f10a9f155eb5f7a93e6.zip
Linker script for gmini targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5890 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/app.lds77
-rwxr-xr-xtools/configure23
2 files changed, 98 insertions, 2 deletions
diff --git a/firmware/app.lds b/firmware/app.lds
index cc2939238d..48ef36cbf1 100644
--- a/firmware/app.lds
+++ b/firmware/app.lds
@@ -10,6 +10,81 @@ OUTPUT_FORMAT(elf32-sh)
10#endif 10#endif
11INPUT(crt0.o) 11INPUT(crt0.o)
12 12
13#if CONFIG_CPU == TCC730
14MEMORY
15{
16 FIRMWARE : ORIGIN = LOADADDRESS, LENGTH = 256K
17 FLASH (RX) : ORIGIN = 0x000000, LENGTH = 1024K
18 ICMEM (RX) : ORIGIN = 0x3FC000, LENGTH = 32K
19 IMEM1 : ORIGIN = 0x200000, LENGTH = 32K
20 IMEM2 : ORIGIN = 0x210000, LENGTH = 32K
21 IMEM3 : ORIGIN = 0x220000, LENGTH = 16K
22 IMEM4 : ORIGIN = 0x230000, LENGTH = 16K
23
24 DRAM : ORIGIN = 0x000000, LENGTH = 0x3F0000
25}
26
27SECTIONS
28{
29.text LOADADDRESS : {
30 *(.init.text)
31 *(.text)
32 *(.icode) /* We don't put it in ICMEM coz crt1 uses LCD (now)*/
33 }> FLASH AT> FIRMWARE
34
35.icode 0x3FC040: {
36 *(.vectors)
37 }> ICMEM AT> FIRMWARE
38
39
40.data 0x2000: {
41 *(.data)
42 . = ALIGN(2);
43 *(.rodata)
44 . = ALIGN(2);
45 *(.rodata.str1.2)
46 . = ALIGN(2);
47 }> DRAM AT> FIRMWARE
48
49.bss ALIGN(2) : {
50 *(.bss)
51 . = ALIGN(2);
52 }> DRAM
53
54.stack ALIGN(2) : {
55 . = . + 0x2000;
56}> DRAM
57
58.idata 0x200000: {
59 *(.idata)
60}> DRAM
61
62
63_codesize = SIZEOF(.text);
64
65_icodecopy = LOADADDR(.icode);
66_icodestart = ADDR(.icode);
67_icodesize = SIZEOF(.icode);
68
69_datacopy = LOADADDR(.data);
70_datastart = ADDR(.data);
71_datasize = SIZEOF(.data);
72
73
74_bssstart = ADDR(.bss);
75_bsssize = (SIZEOF(.bss) + 1) & ~ 1;
76
77_stackbegin = ADDR(.stack);
78_stackend = ADDR(.stack) + SIZEOF(.stack);
79
80_idatastart = ADDR(.idata);
81
82}
83
84#else
85
86
87
13#define PLUGINSIZE 0x8000 88#define PLUGINSIZE 0x8000
14 89
15#ifdef DEBUG 90#ifdef DEBUG
@@ -123,3 +198,5 @@ SECTIONS
123 pluginbuf = .; 198 pluginbuf = .;
124 } 199 }
125} 200}
201
202#endif
diff --git a/tools/configure b/tools/configure
index cc220cdcef..8ffc5f2c8a 100755
--- a/tools/configure
+++ b/tools/configure
@@ -35,7 +35,7 @@ calmrisccc () {
35 AR=calmrisc16-unknown-elf-ar 35 AR=calmrisc16-unknown-elf-ar
36 AS=calmrisc16-unknown-elf-as 36 AS=calmrisc16-unknown-elf-as
37 OC=calmrisc16-unknown-elf-objcopy 37 OC=calmrisc16-unknown-elf-objcopy
38 GCCOPTS="$CCOPTS" 38 GCCOPTS="-Wl\,--no-check-sections $CCOPTS"
39 GCCOPTIMIZE="-fomit-frame-pointer" 39 GCCOPTIMIZE="-fomit-frame-pointer"
40} 40}
41 41
@@ -49,6 +49,22 @@ coldfirecc () {
49 GCCOPTIMIZE="-fomit-frame-pointer" 49 GCCOPTIMIZE="-fomit-frame-pointer"
50} 50}
51 51
52whichaddr () {
53 case $archos in
54 gmini120)
55 echo ""
56 echo "Where do you want the firmware to be flashed?"
57 echo "WARNING: Do not answer this question lightly,"
58 echo "unless you don't plan to flash your gmini."
59 echo "In this case, reply '0x10000' (no quotes) and "
60 echo "re-configure when you know better."
61 loadaddress=`input`
62 ;;
63 *)
64 ;;
65 esac
66}
67
52whichsim () { 68whichsim () {
53 69
54if [ -z "$simver" ]; then 70if [ -z "$simver" ]; then
@@ -315,7 +331,7 @@ if [ -z "$archos" ]; then
315 331
316 5) 332 5)
317 archos="gmini120" 333 archos="gmini120"
318 target="-DARCHOS_GMINI120" 334 target="-DARCHOS_GMINI120 -DLOADADDRESS=\$(LOADADDRESS)"
319 memory=16 # fixed size (16 is a guess, remove comment when checked) 335 memory=16 # fixed size (16 is a guess, remove comment when checked)
320 calmrisccc 336 calmrisccc
321 tool="$rootdir/tools/scramble" # not correct but... 337 tool="$rootdir/tools/scramble" # not correct but...
@@ -439,6 +455,7 @@ if [ -z "$debug" ]; then
439 esac 455 esac
440fi 456fi
441 457
458whichaddr
442 459
443if [ -z "$language" ]; then 460if [ -z "$language" ]; then
444 461
@@ -480,6 +497,7 @@ sed > Makefile \
480 -e "s,@FLASHFILE@,${flash},g" \ 497 -e "s,@FLASHFILE@,${flash},g" \
481 -e "s,@PLUGINS@,${plugins},g" \ 498 -e "s,@PLUGINS@,${plugins},g" \
482 -e "s,@GCCOPTS@,${GCCOPTS},g" \ 499 -e "s,@GCCOPTS@,${GCCOPTS},g" \
500 -e "s,@LOADADDRESS@,${loadaddress},g" \
483 -e "s,@EXTRADEF@,${extradefines},g" \ 501 -e "s,@EXTRADEF@,${extradefines},g" \
484 -e "s,@APPSDIR@,${appsdir},g" \ 502 -e "s,@APPSDIR@,${appsdir},g" \
485<<EOF 503<<EOF
@@ -510,6 +528,7 @@ export AR=@AR@
510export AS=@AS@ 528export AS=@AS@
511export OC=@OC@ 529export OC=@OC@
512export GCCOPTS=@GCCOPTS@ 530export GCCOPTS=@GCCOPTS@
531export LOADADDRESS=@LOADADDRESS@
513 532
514.PHONY: all clean tags zip 533.PHONY: all clean tags zip
515 534