summaryrefslogtreecommitdiffstats
path: root/firmware/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 9e780a331e10..40881a96be00 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -35,6 +35,9 @@ quiet_cmd_ihex = IHEX $@
quiet_cmd_ihex2fw = IHEX2FW $@
cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@
+quiet_cmd_h16tofw = H16TOFW $@
+ cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@
+
quiet_cmd_fwbin = MK_FW $@
cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \
FWSTR="$(subst /,_,$(subst .,_,$(subst -,_,$(patsubst \
@@ -99,6 +102,10 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
$(call cmd,ihex2fw)
+# .H16 is our own modified form of Intel HEX, with 16-bit length for records.
+$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
+ $(call cmd,h16tofw)
+
$(firmware-dirs):
$(call cmd,mkdir)