summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-02-18 11:26:52 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-02-20 03:00:00 +0000
commitc955bd846da9d1d7e4b354da6dcacf8b941fe2e7 (patch)
tree5c861a5d3390e232dd535f232ed9c4897ab2c54d
parentb4274d04f318fbc08ea6688d67ff900bc2fccf52 (diff)
downloadchrome-ec-c955bd846da9d1d7e4b354da6dcacf8b941fe2e7.tar.gz
cr50: Add ec.hex to hex: build target
When the default build target creates .hex files, emit the complete ec.hex output as well as the RO and RW halves. BUG=none BRANCH=none TEST=make BOARD=cr50 Change-Id: Ia87bbace29d89695ef6a9c090c895ca10f14d919 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/251014 Reviewed-by: Sheng-liang Song <ssl@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--Makefile.rules6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 4dd8b8a723..e7c7f856e8 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -42,6 +42,7 @@ cmd_flat_to_obj = $(CC) -T $(out)/firmware_image.lds -nostdlib $(CPPFLAGS) \
cmd_elf_to_flat = $(OBJCOPY) -O binary $^ $@
cmd_elf_to_dis = $(OBJDUMP) -D $< > $@
cmd_elf_to_hex = $(OBJCOPY) -O ihex $^ $@
+cmd_obj_to_hex = $(OBJCOPY) -O ihex $^ $@
cmd_elf = $(LD) $(objs) $(LDFLAGS) -o $@ -T $< -Map $(out)/$*.map
cmd_exe = $(CC) $(objs) $(HOST_TEST_LDFLAGS) -o $@
cmd_c_to_o = $(CC) $(CFLAGS) -MMD -MF $@.d -c $< -o $@
@@ -84,7 +85,7 @@ dis-y = $(out)/$(PROJECT).RW.dis
dis-$(CONFIG_FW_INCLUDE_RO) += $(out)/$(PROJECT).RO.dis
dis: $(dis-y)
-hex-y = $(out)/$(PROJECT).RO.hex $(out)/$(PROJECT).RW.hex
+hex-y = $(out)/$(PROJECT).RO.hex $(out)/$(PROJECT).RW.hex $(out)/$(PROJECT).hex
hex: $(hex-y)
utils-host: $(host-utils)
@@ -177,6 +178,9 @@ $(out)/%.flat: $(out)/%.elf
$(out)/%.hex: $(out)/%.elf
$(call quiet,elf_to_hex,OBJCOPY)
+$(out)/$(PROJECT).hex: $(out)/$(PROJECT).obj
+ $(call quiet,obj_to_hex,OBJCOPY)
+
$(out)/%.elf: $(out)/%.lds $(objs)
$(call quiet,elf,LD )