1 # Makefile for bootrom, see ../common/Makefile.common for common settings
2 include ..
/common
/Makefile.common
4 OBJJTAG
= $(OBJDIR
)/bootrom.o
$(OBJDIR
)/ram-reset.o
$(OBJDIR
)/usb.o
5 OBJFLASH
= $(OBJDIR
)/flash-reset.o
$(OBJDIR
)/fromflash.o
7 THUMBSRC
= usb.c fromflash.c bootrom.c
8 ASMSRC
= ram-reset.s flash-reset.s
10 THUMBOBJ
= $(patsubst %.c
,$(OBJDIR
)/%.o
,$(THUMBSRC
))
11 ASMOBJ
= $(patsubst %.s
,$(OBJDIR
)/%.o
,$(ASMSRC
))
13 all: bootrom-merged.s19
15 bootrom-merged.s19
: $(OBJDIR
)/bootrom.s19
$(OBJDIR
)/bootrom-forjtag.s19
16 perl ..
/tools
/merge-srec.pl
$(OBJDIR
)/bootrom.s19
$(OBJDIR
)/bootrom-forjtag.s19
> bootrom-merged.s19
18 $(OBJDIR
)/bootrom.elf
: $(OBJFLASH
)
19 $(LD
) -g
-Tldscript-flash
--oformat elf32-littlearm
-Map
=$(patsubst %.elf
,%.map
,$@
) -o
$@
$^
21 $(OBJDIR
)/bootrom-forjtag.elf
: $(OBJJTAG
)
22 $(LD
) -g
-Tldscript-ram-jtag
--oformat elf32-littlearm
-Map
=$(patsubst %.elf
,%.map
,$@
) -o
$@
$^
24 $(OBJDIR
)/%.s19
: $(OBJDIR
)/%.elf
25 $(OBJCOPY
) -Osrec
--srec-forceS3
$^
$@
27 $(THUMBOBJ
): $(OBJDIR
)/%.o
: %.c
$(INCLUDES
)
28 $(CC
) $(CFLAGS
) -mthumb
-mthumb-interwork
-o
$@
$<
30 $(ASMOBJ
): $(OBJDIR
)/%.o
: %.s
31 $(CC
) $(CFLAGS
) -mthumb-interwork
-o
$@
$<
34 $(DELETE
) $(OBJDIR
)$(PATHSEP
)*.o
35 $(DELETE
) $(OBJDIR
)$(PATHSEP
)*.elf
36 $(DELETE
) $(OBJDIR
)$(PATHSEP
)*.s19
37 $(DELETE
) $(OBJDIR
)$(PATHSEP
)*.map
38 $(DELETE
) bootrom-merged.s19
40 .PHONY
: all clean help
42 @echo Multi-OS Makefile
, you are running on
$(DETECTED_OS
)
43 @echo Possible targets
:
44 @echo
+ all - Make bootrom-merged.s19
, the main bootrom
45 @echo
+ clean - Clean
$(OBJDIR
)