Refactor in order to have an interface for each project; Add programmer info help.
author(no author) <(no author)@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 12:58:43 +0000 (12:58 +0000)
committer(no author) <(no author)@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 12:58:43 +0000 (12:58 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2794 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/config.mk
bertos/rules.mk

index 845083f9f90a9d2dcba9baa834ad11961eff0c32..752313a3eecec65ed1f16a9ed64dc102d10bb285 100644 (file)
@@ -10,7 +10,6 @@
 #
 # Programmer type
 # see local pgm_config.mk for programmer customization.
--include pgm_config.mk
 
 OPTCFLAGS = -ffunction-sections -fdata-sections
 #OPTCFLAGS = -funsafe-loop-optimizations
index cce8ccba9dc3d01b3bea6eede3648343dea6cc86..a6dae1df6c4df24ac409deea85af27f6bcbd1e81 100644 (file)
@@ -245,9 +245,15 @@ $$(OUTDIR)/$(1)_whole.elf: bumprev $$($(1)_SRC) $$($(1)_LDSCRIPT)
 # NOTE: we retry in case of failure because the STK500 programmer is crappy
 .PHONY: flash_$(1)
 flash_$(1): $(OUTDIR)/$(1).hex flash_$(1)_local
-       PROGRAMMER_CPU=$$($(1)_PROGRAMMER_CPU) PROGRAMMER_TYPE=$(PROGRAMMER_TYPE) \
-       PROGRAMMER_PORT=$(PROGRAMMER_PORT) IMAGE_FILE=$$< \
-       $$($(1)_FLASH_SCRIPT)
+       $L "$(1): Flashing target"
+       $Q if [ ! "$$($(1)_PROGRAMMER_TYPE)" == "none" ] ; then \
+               PROGRAMMER_CPU=$$($(1)_PROGRAMMER_CPU) PROGRAMMER_TYPE=$$($(1)_PROGRAMMER_TYPE) \
+               PROGRAMMER_PORT=$$($(1)_PROGRAMMER_PORT) IMAGE_FILE=$$< \
+               $$($(1)_FLASH_SCRIPT) ; \
+       else \
+               printf "No programmer interface configured, see http://dev.bertos.org/wiki/ProgrammerInterface\n" ; \
+               exit 1 ; \
+       fi
 
 .PHONY: flash_$(1)_local
 flash_$(1)_local: