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
|
||||
endif
|
||||
|
||||
LDS := $(FIRMWARE)/app.lds
|
||||
|
||||
ifdef DEBUG
|
||||
DEFINES := -DDEBUG
|
||||
CFLAGS += -g
|
||||
LDS := $(FIRMWARE)/gdb.lds
|
||||
else
|
||||
LDS := $(FIRMWARE)/app.lds
|
||||
endif
|
||||
|
||||
SRC := $(wildcard *.c)
|
||||
|
|
@ -76,7 +75,7 @@ $(OBJDIR)/librockbox.a:
|
|||
# MEM should be passed on to this makefile with the chosen memory size given
|
||||
# in number of MB
|
||||
$(LINKFILE): $(LDS)
|
||||
cat $< | $(CC) -DMEMORYSIZE=$(MEM) -E -P - >$@
|
||||
cat $< | $(CC) -DMEMORYSIZE=$(MEM) $(DEFINES) -E -P - >$@
|
||||
|
||||
$(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
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@ ENTRY(start)
|
|||
OUTPUT_FORMAT(elf32-sh)
|
||||
INPUT(crt0.o)
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DRAMSIZE 0x1f0000
|
||||
#define ORIGADDR 0x09010000
|
||||
#else
|
||||
#define DRAMSIZE (MEMORYSIZE * 0x100000)
|
||||
#define ORIGADDR 0x09000000
|
||||
#endif
|
||||
|
||||
MEMORY
|
||||
{
|
||||
DRAM : ORIGIN = 0x09000000, LENGTH = DRAMSIZE
|
||||
DRAM : ORIGIN = ORIGADDR, LENGTH = DRAMSIZE
|
||||
IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +62,15 @@ SECTIONS
|
|||
_end = .;
|
||||
} > DRAM
|
||||
|
||||
#ifdef DEBUG
|
||||
.heap :
|
||||
{
|
||||
_poolstart = .;
|
||||
. = 0x20000;
|
||||
_poolend = .;
|
||||
} > DRAM
|
||||
#endif
|
||||
|
||||
.mp3buf :
|
||||
{
|
||||
_mp3buf = .;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue