2009-08-26 19:17:05 +08:00
|
|
|
# Makefile for bootrom, see ../common/Makefile.common for common settings
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-27 12:25:34 +08:00
|
|
|
# DO NOT use thumb mode in the phase 1 bootloader since that generates a section with glue code
|
|
|
|
ARMSRC = fromflash.c
|
|
|
|
THUMBSRC = usb.c bootrom.c
|
|
|
|
ASMSRC = ram-reset.s flash-reset.s
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
|
2009-08-27 01:34:19 +08:00
|
|
|
include ../common/Makefile.common
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-27 12:25:34 +08:00
|
|
|
all: $(OBJDIR)/bootrom.s19
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-27 12:25:34 +08:00
|
|
|
$(OBJDIR)/bootrom.elf: $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ)
|
2009-08-26 19:17:05 +08:00
|
|
|
$(LD) -g -Tldscript-flash --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
|
2009-04-09 14:43:20 +08:00
|
|
|
|
|
|
|
clean:
|
2009-08-26 19:17:05 +08:00
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.o
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.elf
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.s19
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.map
|
2009-08-27 01:34:19 +08:00
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.d
|
2009-08-26 19:17:05 +08:00
|
|
|
|
|
|
|
.PHONY: all clean help
|
|
|
|
help:
|
|
|
|
@echo Multi-OS Makefile, you are running on $(DETECTED_OS)
|
|
|
|
@echo Possible targets:
|
2009-08-27 12:25:34 +08:00
|
|
|
@echo + all - Make $(OBJDIR)/bootrom.s19, the main bootrom
|
2009-08-26 19:17:05 +08:00
|
|
|
@echo + clean - Clean $(OBJDIR)
|