make: Improve dependency tracking for exe targets

- Add wildcarded linker scripts to dependencies
- Run flash-push only on current hex file

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-03-29 16:44:42 +00:00
commit 5210ba2acf
4 changed files with 23 additions and 19 deletions

View file

@ -27,9 +27,9 @@ flash-clean-hex:
%.hex: %.bin
$(OBJCOPY) $(MCU_OBJCOPY_FETCH_OPTS) -I binary -O ihex $< $@.tmp
mv $@.tmp $@
flash-push:
flash-push: $(MCU_FLASH_PUSH_FILE_HEX)
# see http://openocd.org/doc/html/Flash-Programming.html
$(MCU_OPENOCD) -c "program $(MCU_FLASH_PUSH_FILE_HEX) verify reset exit $(MCU_FLASH_PUSH_OFFSET)"
$(MCU_OPENOCD) -c "program $< verify reset exit $(MCU_FLASH_PUSH_OFFSET)"
%-flash-push:
MCU_FLASH_PUSH_FILE_HEX=$* make flash-push