Fix loadables to honor size $RAMCODE from Makefile.inc
This commit is contained in:
parent
a03f202e7c
commit
876ee2474f
|
@ -1,3 +1,4 @@
|
|||
*.elf
|
||||
*.bin
|
||||
*.h
|
||||
loadable.ld
|
||||
|
|
|
@ -22,12 +22,20 @@ include $(ROOT_PATH)/Makefile.inc
|
|||
# Compiler settings, parameters and flags
|
||||
##########################################################################
|
||||
FIRMWARE=$(ROOT_PATH)/$(OUTFILE).elf
|
||||
LDSRCFILE=$(DIR)/ram.ld
|
||||
LDFILE=$(DIR)/loadable.ld
|
||||
CFLAGS+=-mlong-calls
|
||||
LDFLAGS+= -R $(FIRMWARE)
|
||||
|
||||
all: $(OBJS) $(ELFS) $(BINS) $(HDRS)
|
||||
|
||||
$(LDFILE):
|
||||
-@echo "MEMORY" > $(LDFILE)
|
||||
-@echo "{" >> $(LDFILE)
|
||||
-@echo " sram(rwx): ORIGIN = 0x10002000 - $(RAMCODE), LENGTH = $(RAMCODE)" >> $(LDFILE)
|
||||
-@echo "}" >> $(LDFILE)
|
||||
-@echo "INCLUDE $(LDSRCFILE)" >> $(LDFILE)
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
|
@ -45,3 +53,5 @@ clean:
|
|||
cd $(DIR) && rm -f *.o *.elf *.bin
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
.PHONY: $(LDFILE)
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
MEMORY
|
||||
{
|
||||
sram(rwx): ORIGIN = 0x10001800, LENGTH = 2K
|
||||
}
|
||||
|
||||
|
||||
sram_top = ORIGIN(sram) + LENGTH(sram);
|
||||
ENTRY(boot_entry)
|
Loading…
Reference in New Issue