From 2e4219da9aa3d3a5f68a7aa7966f8d460692692b Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 15 Dec 2012 22:17:58 +0100 Subject: build: add program target --- build/stm32f4.mk | 9 +++++++++ build/top.mk | 5 +++++ 2 files changed, 14 insertions(+) (limited to 'build') diff --git a/build/stm32f4.mk b/build/stm32f4.mk index ae899b5..71ffcbd 100644 --- a/build/stm32f4.mk +++ b/build/stm32f4.mk @@ -42,3 +42,12 @@ $(eval $(call arch_lst_rules,stm32f4)) $(eval $(call arch_bin_rules,stm32f4)) $(eval $(call arch_size_rules,stm32f4)) $(eval $(call arch_misc_rules,stm32f4)) + +.PHONY: program.stm32f4 +ifeq ($(words $(stm32f4_PROGS)),1) +program.stm32f4: $(stm32f4_PROGS:%=%.stm32f4.program) +endif + +%.stm32f4.program: %.stm32f4.bin + @echo "PROG [stm32f4] $<" + $Qst-flash write $< 0x8000000 diff --git a/build/top.mk b/build/top.mk index 71fe1be..d4f53fe 100644 --- a/build/top.mk +++ b/build/top.mk @@ -66,3 +66,8 @@ $(foreach target,$(TARGETS),$(eval $(call TARGETS_template,$(target)))) TARGETS_SUBTARGETS := $(foreach target,$(TARGETS),$(target):$(target) \ $(foreach subtarget,$($(target)_SUBTARGETS),$(target):$(subtarget))) + +.PHONY: program +ifeq ($(words $(filter-out host,$(TARGETS))),1) +program: $(patsubst %,program.%,$(filter-out host,$(TARGETS))) +endif -- cgit v1.2.3