mcu-defs.mk, mcu-flash.mk: Ongoing improvements

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-03-12 11:38:19 +00:00
commit 4216943215
2 changed files with 5 additions and 7 deletions

View file

@ -12,13 +12,13 @@ $(MCU_FLASH_FETCH_FILE_BIN):
$(MCU_OPENOCD) -c "init" -c "reset init" -c "flash read_bank $(MCU_FLASH_FETCH_BANK) $@.tmp $(MCU_FLASH_FETCH_OFFSET) $(MCU_FLASH_FETCH_SIZE)" -c "exit"
mv $@.tmp $@
%.hex: %.elf
$(MCU_OBJCOPY) -O ihex $< $@.tmp
$(OBJCOPY) -O ihex $< $@.tmp
mv $@.tmp $@
clean: flash-clean-hex
flash-clean-hex:
rm -rf $(MCU_FLASH_PUSH_FILE_HEX)
%.hex: %.bin
$(MCU_OBJCOPY) $(MCU_OBJCOPY_FETCH_OPTS) -I binary -O ihex $< $@.tmp
$(OBJCOPY) $(MCU_OBJCOPY_FETCH_OPTS) -I binary -O ihex $< $@.tmp
mv $@.tmp $@
flash-push:
# see http://openocd.org/doc/html/Flash-Programming.html