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