-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
29 lines (21 loc) · 928 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# Simple (hackish) coordination makefile that produces an Upgrade.bin
# with an example software stack.
#
# Assumes that you've copied the original firmware into this directory
# under the filename Upgrade.orig.bin.
#
LINKER_SCRIPT = libopencm3/lib/libopencm3_stm32f1.ld
all: Upgrade.bin
Upgrade.bin: example_layout.yaml boot_select/bootsel.bin bootloader_extractor/extractor.bin alt_bootloader/usbdfu.bin
python3 ./compose-fw.py example_layout.yaml
boot_select/bootsel.bin: boot_select/bootsel.S boot_select/bootsel.ld $(LINKER_SCRIPT)
$(MAKE) -C boot_select
alt_bootloader/usbdfu.bin: alt_bootloader/usbdfu.c alt_bootloader/usbdfu.ld $(LINKER_SCRIPT)
$(MAKE) -C alt_bootloader
bootloader_extractor/extractor.bin: bootloader_extractor/extractor.c bootloader_extractor/extractor.ld $(LINKER_SCRIPT)
$(MAKE) -C bootloader_extractor
$(LINKER_SCRIPT):
git submodule init
git submodule update
$(MAKE) -C libopencm3