]>
Commit | Line | Data |
---|---|---|
7e931bbd | 1 | # Makefile for bootrom, see ../common/Makefile.common for common settings\r |
6658905f | 2 | \r |
8652988d | 3 | # DO NOT use thumb mode in the phase 1 bootloader since that generates a section with glue code\r |
4 | ARMSRC = fromflash.c \r | |
4271e82d | 5 | THUMBSRC = usb.c bootrom.c\r |
8652988d | 6 | ASMSRC = ram-reset.s flash-reset.s\r |
6658905f | 7 | \r |
8fcbf652 | 8 | ## There is a strange bug with the linker: Sometimes it will not emit the glue to call\r |
9 | ## BootROM from ARM mode. The symbol is emitted, but the section will be filled with\r | |
10 | ## zeroes. As a temporary workaround, do not use thumb for the phase 2 bootloader\r | |
11 | ## -- Henryk Plötz <henryk@ploetzli.ch> 2009-09-01\r | |
12 | ARMSRC := $(ARMSRC) $(THUMBSRC)\r | |
13 | THUMBSRC := \r | |
14 | \r | |
5e174a51 | 15 | # stdint.h provided locally until GCC 4.5 becomes C99 compliant\r |
16 | APP_CFLAGS = -I.\r | |
17 | \r | |
e73e7172 | 18 | # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC\r |
0fc0fca5 | 19 | include ../common/Makefile.common\r |
6658905f | 20 | \r |
8652988d | 21 | all: $(OBJDIR)/bootrom.s19\r |
6658905f | 22 | \r |
4271e82d | 23 | $(OBJDIR)/bootrom.elf: $(VERSIONOBJ) $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ)\r |
7e931bbd | 24 | $(LD) -g -Tldscript-flash --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r |
6658905f | 25 | \r |
6658905f | 26 | clean:\r |
7e931bbd | 27 | $(DELETE) $(OBJDIR)$(PATHSEP)*.o\r |
28 | $(DELETE) $(OBJDIR)$(PATHSEP)*.elf\r | |
29 | $(DELETE) $(OBJDIR)$(PATHSEP)*.s19\r | |
30 | $(DELETE) $(OBJDIR)$(PATHSEP)*.map\r | |
0fc0fca5 | 31 | $(DELETE) $(OBJDIR)$(PATHSEP)*.d\r |
8a6aec16 | 32 | $(DELETE) version.c\r |
7e931bbd | 33 | \r |
8a6aec16 | 34 | .PHONY: all clean help \r |
7e931bbd | 35 | help:\r |
36 | @echo Multi-OS Makefile, you are running on $(DETECTED_OS)\r | |
37 | @echo Possible targets:\r | |
8652988d | 38 | @echo + all - Make $(OBJDIR)/bootrom.s19, the main bootrom\r |
7e931bbd | 39 | @echo + clean - Clean $(OBJDIR)\r |