diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-02-26 16:05:30 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-02-26 16:05:30 +0000 |
commit | b0c6276b40a53c5ca96474c6f76fa566d81cf1c6 (patch) | |
tree | db1529688f3e3939bc0c10e4ce9e46c35f65aa42 | |
parent | a0086b61e142ec2847d90b0ba6643a106d81f3f4 (diff) | |
download | rockbox-b0c6276b40a53c5ca96474c6f76fa566d81cf1c6.tar.gz rockbox-b0c6276b40a53c5ca96474c6f76fa566d81cf1c6.zip |
Moved to one single .lds file for ALL builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3347 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/Makefile | 7 | ||||
-rw-r--r-- | firmware/app.lds | 17 |
2 files changed, 19 insertions, 5 deletions
diff --git a/apps/Makefile b/apps/Makefile index 9c2b961a5a..dfd1ae2710 100644 --- a/apps/Makefile +++ b/apps/Makefile | |||
@@ -31,12 +31,11 @@ ifndef MEM | |||
31 | MEM=2 | 31 | MEM=2 |
32 | endif | 32 | endif |
33 | 33 | ||
34 | LDS := $(FIRMWARE)/app.lds | ||
35 | |||
34 | ifdef DEBUG | 36 | ifdef DEBUG |
35 | DEFINES := -DDEBUG | 37 | DEFINES := -DDEBUG |
36 | CFLAGS += -g | 38 | CFLAGS += -g |
37 | LDS := $(FIRMWARE)/gdb.lds | ||
38 | else | ||
39 | LDS := $(FIRMWARE)/app.lds | ||
40 | endif | 39 | endif |
41 | 40 | ||
42 | SRC := $(wildcard *.c) | 41 | SRC := $(wildcard *.c) |
@@ -76,7 +75,7 @@ $(OBJDIR)/librockbox.a: | |||
76 | # MEM should be passed on to this makefile with the chosen memory size given | 75 | # MEM should be passed on to this makefile with the chosen memory size given |
77 | # in number of MB | 76 | # in number of MB |
78 | $(LINKFILE): $(LDS) | 77 | $(LINKFILE): $(LDS) |
79 | cat $< | $(CC) -DMEMORYSIZE=$(MEM) -E -P - >$@ | 78 | cat $< | $(CC) -DMEMORYSIZE=$(MEM) $(DEFINES) -E -P - >$@ |
80 | 79 | ||
81 | $(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/librockbox.a | 80 | $(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/librockbox.a |
82 | $(CC) -Os -nostdlib -o $(OBJDIR)/rockbox.elf $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map | 81 | $(CC) -Os -nostdlib -o $(OBJDIR)/rockbox.elf $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map |
diff --git a/firmware/app.lds b/firmware/app.lds index c6149252cb..4a8ae724fa 100644 --- a/firmware/app.lds +++ b/firmware/app.lds | |||
@@ -2,11 +2,17 @@ ENTRY(start) | |||
2 | OUTPUT_FORMAT(elf32-sh) | 2 | OUTPUT_FORMAT(elf32-sh) |
3 | INPUT(crt0.o) | 3 | INPUT(crt0.o) |
4 | 4 | ||
5 | #ifdef DEBUG | ||
6 | #define DRAMSIZE 0x1f0000 | ||
7 | #define ORIGADDR 0x09010000 | ||
8 | #else | ||
5 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | 9 | #define DRAMSIZE (MEMORYSIZE * 0x100000) |
10 | #define ORIGADDR 0x09000000 | ||
11 | #endif | ||
6 | 12 | ||
7 | MEMORY | 13 | MEMORY |
8 | { | 14 | { |
9 | DRAM : ORIGIN = 0x09000000, LENGTH = DRAMSIZE | 15 | DRAM : ORIGIN = ORIGADDR, LENGTH = DRAMSIZE |
10 | IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000 | 16 | IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000 |
11 | } | 17 | } |
12 | 18 | ||
@@ -56,6 +62,15 @@ SECTIONS | |||
56 | _end = .; | 62 | _end = .; |
57 | } > DRAM | 63 | } > DRAM |
58 | 64 | ||
65 | #ifdef DEBUG | ||
66 | .heap : | ||
67 | { | ||
68 | _poolstart = .; | ||
69 | . = 0x20000; | ||
70 | _poolend = .; | ||
71 | } > DRAM | ||
72 | #endif | ||
73 | |||
59 | .mp3buf : | 74 | .mp3buf : |
60 | { | 75 | { |
61 | _mp3buf = .; | 76 | _mp3buf = .; |