4 OBJCOPY
= arm-elf-objcopy
10 INCLUDES
= ..
/include/proxmark3.h ..
/include/at91sam7s128.h ..
/include/config_gpio.h ..
/include/usb_cmd.h
12 CFLAGS
= -g
-c
$(INCLUDE
) -Wall
14 OBJJTAG
= $(OBJDIR
)/bootrom.o
$(OBJDIR
)/ram-reset.o
$(OBJDIR
)/usb.o
16 OBJFLASH
= $(OBJDIR
)/flash-reset.o
$(OBJDIR
)/fromflash.o
20 bootrom.s19
: $(OBJDIR
)/bootrom.s19
$(OBJDIR
)/bootrom-forjtag.s19
22 @perl ..
\tools\merge-srec.pl
$(OBJDIR
)\bootrom.s19
$(OBJDIR
)\bootrom
-forjtag.s19
> $(OBJDIR
)\bootrom
-merged.s19
23 @perl ..
\tools\srecswap.pl
$(OBJDIR
)\bootrom
-forjtag.s19
> $(OBJDIR
)\bootrom
-forjtag
-swapped.s19
25 $(OBJDIR
)/bootrom.s19
: $(OBJFLASH
)
27 @
$(LD
) -g
-Tldscript-flash
--oformat elf32-littlearm
-o
$(OBJDIR
)/bootrom.elf
$(OBJFLASH
)
28 @
$(OBJCOPY
) -Osrec
--srec-forceS3
$(OBJDIR
)/bootrom.elf
$(OBJDIR
)/bootrom.s19
30 $(OBJDIR
)/bootrom-forjtag.s19
: $(OBJJTAG
)
31 @echo obj
/bootrom-forjtag.s19
32 @
$(LD
) -g
-Tldscript-ram-jtag
--oformat elf32-littlearm
-o
$(OBJDIR
)/bootrom-forjtag.elf
$(OBJJTAG
)
33 @
$(OBJCOPY
) -Osrec
--srec-forceS3
$(OBJDIR
)/bootrom-forjtag.elf
$(OBJDIR
)/bootrom-forjtag.s19
35 $(OBJDIR
)/bootrom.o
: bootrom.c
$(INCLUDES
)
37 @
$(CC
) $(CFLAGS
) -mthumb
-mthumb-interwork bootrom.c
-o
$(OBJDIR
)/bootrom.o
39 $(OBJDIR
)/fromflash.o
: fromflash.c
$(INCLUDES
)
41 @
$(CC
) $(CFLAGS
) -mthumb
-mthumb-interwork fromflash.c
-o
$(OBJDIR
)/fromflash.o
43 $(OBJDIR
)/usb.o
: ..
/common
/usb.c
$(INCLUDES
)
45 @
$(CC
) $(CFLAGS
) -mthumb
-mthumb-interwork ..
/common
/usb.c
-o
$(OBJDIR
)/usb.o
47 $(OBJDIR
)/ram-reset.o
: ram-reset.s
49 @
$(CC
) $(CFLAGS
) -mthumb-interwork
-o
$(OBJDIR
)/ram-reset.o ram-reset.s
51 $(OBJDIR
)/flash-reset.o
: flash-reset.s
53 @
$(CC
) $(CFLAGS
) -mthumb-interwork
-o
$(OBJDIR
)/flash-reset.o flash-reset.s