summaryrefslogtreecommitdiff
path: root/build/arch.mk
diff options
context:
space:
mode:
authorNicolas Schodet2013-05-01 12:30:06 +0200
committerNicolas Schodet2019-10-07 00:01:14 +0200
commitb248612634e76d1537f275e1b125f488b263df45 (patch)
tree44e152e996e4072e8dfd82a813d46b5e2871ccc8 /build/arch.mk
parent996aca5612de78239a01f52bc79d75a5e403d5c7 (diff)
build: compute CRC32 when building a .bin
Diffstat (limited to 'build/arch.mk')
-rw-r--r--build/arch.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/build/arch.mk b/build/arch.mk
index 62f0687..99f0c5f 100644
--- a/build/arch.mk
+++ b/build/arch.mk
@@ -88,16 +88,17 @@ define arch_bin_rules
hex: hex.$1
srec: srec.$1
bin: bin.$1
+crc: crc.$1
all.$1: hex.$1
ifneq ($$(wildcard *.$1.srec),)
all.$1: srec.$1
endif
ifneq ($$(wildcard *.$1.bin),)
-all.$1: bin.$1
+all.$1: bin.$1 crc.$1
endif
-.PHONY: hex.$1 srec.$1 bin.$1
+.PHONY: hex.$1 srec.$1 bin.$1 crc.$1
hex.$1: $$($1_PROGS:%=%.$1.hex)
srec.$1: $$($1_PROGS:%=%.$1.srec)
@@ -113,6 +114,9 @@ bin.$1: $$($1_PROGS:%=%.$1.bin)
@echo "BIN [$1] $$@"
$$Q$$($1_OBJCOPY) -O binary $$< $$@
+crc.$1: $$($1_PROGS:%=%.$1.bin)
+ $Q$$(BASE)/build/tools/crc $$^
+
$1_EXTRA_CLEAN += $$($1_PROGS:%=%.$1.hex) \
$$($1_PROGS:%=%.$1.srec) \
$$($1_PROGS:%=%.$1.bin)