From 5e8e8213e0cb670efdba096c2c44430cbfc0920b Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sat, 15 Dec 2012 22:17:58 +0100 Subject: digital/ucoolib/build: add program target --- digital/ucoolib/build/stm32f4.mk | 9 +++++++++ digital/ucoolib/build/top.mk | 5 +++++ 2 files changed, 14 insertions(+) (limited to 'digital/ucoolib/build') diff --git a/digital/ucoolib/build/stm32f4.mk b/digital/ucoolib/build/stm32f4.mk index ae899b53..71ffcbdd 100644 --- a/digital/ucoolib/build/stm32f4.mk +++ b/digital/ucoolib/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/digital/ucoolib/build/top.mk b/digital/ucoolib/build/top.mk index 71fe1be0..d4f53fe4 100644 --- a/digital/ucoolib/build/top.mk +++ b/digital/ucoolib/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