X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/8652988d62b19631e498b62a3800f0decb5e743a..57fcd2d7d14c7c41242aaae49653f3669971f4d6:/bootrom/Makefile?ds=inline

diff --git a/bootrom/Makefile b/bootrom/Makefile
index 43e2533f..f88b3cdd 100644
--- a/bootrom/Makefile
+++ b/bootrom/Makefile
@@ -5,12 +5,19 @@ ARMSRC = fromflash.c
 THUMBSRC = usb.c bootrom.c
 ASMSRC = ram-reset.s flash-reset.s
 
-# Do not move this inclusion before the definition of {THUMB,ASM,ARM}{OBJ,SRC}
+## There is a strange bug with the linker: Sometimes it will not emit the glue to call
+## BootROM from ARM mode. The symbol is emitted, but the section will be filled with
+## zeroes. As a temporary workaround, do not use thumb for the phase 2 bootloader
+## -- Henryk Plötz <henryk@ploetzli.ch> 2009-09-01
+ARMSRC := $(ARMSRC) $(THUMBSRC)
+THUMBSRC := 
+
+# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
 include ../common/Makefile.common
 
 all: $(OBJDIR)/bootrom.s19
 
-$(OBJDIR)/bootrom.elf: $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ)
+$(OBJDIR)/bootrom.elf: $(VERSIONOBJ) $(ASMOBJ) $(ARMOBJ) $(THUMBOBJ)
 	$(LD) -g -Tldscript-flash --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
 
 clean:
@@ -19,8 +26,9 @@ clean:
 	$(DELETE) $(OBJDIR)$(PATHSEP)*.s19
 	$(DELETE) $(OBJDIR)$(PATHSEP)*.map
 	$(DELETE) $(OBJDIR)$(PATHSEP)*.d
+	$(DELETE) version.c
 
-.PHONY: all clean help
+.PHONY: all clean help 
 help:
 	@echo Multi-OS Makefile, you are running on $(DETECTED_OS)
 	@echo Possible targets: