mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-15 16:12:28 -05:00
Moved to one single .lds file for ALL builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3347 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a0086b61e1
commit
b0c6276b40
2 changed files with 19 additions and 5 deletions
|
|
@ -31,12 +31,11 @@ ifndef MEM
|
||||||
MEM=2
|
MEM=2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LDS := $(FIRMWARE)/app.lds
|
||||||
|
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
DEFINES := -DDEBUG
|
DEFINES := -DDEBUG
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
LDS := $(FIRMWARE)/gdb.lds
|
|
||||||
else
|
|
||||||
LDS := $(FIRMWARE)/app.lds
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SRC := $(wildcard *.c)
|
SRC := $(wildcard *.c)
|
||||||
|
|
@ -76,7 +75,7 @@ $(OBJDIR)/librockbox.a:
|
||||||
# MEM should be passed on to this makefile with the chosen memory size given
|
# MEM should be passed on to this makefile with the chosen memory size given
|
||||||
# in number of MB
|
# in number of MB
|
||||||
$(LINKFILE): $(LDS)
|
$(LINKFILE): $(LDS)
|
||||||
cat $< | $(CC) -DMEMORYSIZE=$(MEM) -E -P - >$@
|
cat $< | $(CC) -DMEMORYSIZE=$(MEM) $(DEFINES) -E -P - >$@
|
||||||
|
|
||||||
$(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/librockbox.a
|
$(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(OBJDIR)/librockbox.a
|
||||||
$(CC) -Os -nostdlib -o $(OBJDIR)/rockbox.elf $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map
|
$(CC) -Os -nostdlib -o $(OBJDIR)/rockbox.elf $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,17 @@ ENTRY(start)
|
||||||
OUTPUT_FORMAT(elf32-sh)
|
OUTPUT_FORMAT(elf32-sh)
|
||||||
INPUT(crt0.o)
|
INPUT(crt0.o)
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
#define DRAMSIZE 0x1f0000
|
||||||
|
#define ORIGADDR 0x09010000
|
||||||
|
#else
|
||||||
#define DRAMSIZE (MEMORYSIZE * 0x100000)
|
#define DRAMSIZE (MEMORYSIZE * 0x100000)
|
||||||
|
#define ORIGADDR 0x09000000
|
||||||
|
#endif
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
DRAM : ORIGIN = 0x09000000, LENGTH = DRAMSIZE
|
DRAM : ORIGIN = ORIGADDR, LENGTH = DRAMSIZE
|
||||||
IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
|
IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,6 +62,15 @@ SECTIONS
|
||||||
_end = .;
|
_end = .;
|
||||||
} > DRAM
|
} > DRAM
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
.heap :
|
||||||
|
{
|
||||||
|
_poolstart = .;
|
||||||
|
. = 0x20000;
|
||||||
|
_poolend = .;
|
||||||
|
} > DRAM
|
||||||
|
#endif
|
||||||
|
|
||||||
.mp3buf :
|
.mp3buf :
|
||||||
{
|
{
|
||||||
_mp3buf = .;
|
_mp3buf = .;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue