Add error messages.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 28 Aug 2009 15:10:10 +0000 (15:10 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 28 Aug 2009 15:10:10 +0000 (15:10 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2817 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/rules.mk

index f3171792be7097a146209ef7fb344e94870f64e2..11f8aebbbc80ff07fb1aa8ed5cc8e1e8d13436b4 100644 (file)
@@ -245,6 +245,10 @@ $$(OUTDIR)/$(1)_whole.elf: bumprev $$($(1)_SRC) $$($(1)_LDSCRIPT)
 .PHONY: flash_$(1)
 flash_$(1): $(OUTDIR)/$(1).hex flash_$(1)_local
        $L "$(1): Flashing target"
+       $Q if [ ! -f $$($(1)_FLASH_SCRIPT) ] ; then \
+               printf "No flash script found.\n" ; \
+               exit 1 ; \
+       fi
        $Q if [ ! "$$($(1)_PROGRAMMER_TYPE)" == "none" ] ; then \
                PROGRAMMER_CPU=$$($(1)_PROGRAMMER_CPU) PROGRAMMER_TYPE=$$($(1)_PROGRAMMER_TYPE) \
                PROGRAMMER_PORT=$$($(1)_PROGRAMMER_PORT) IMAGE_FILE=$$< \
@@ -252,7 +256,7 @@ flash_$(1): $(OUTDIR)/$(1).hex flash_$(1)_local
        else \
                printf "No programmer interface configured, see http://dev.bertos.org/wiki/ProgrammerInterface\n" ; \
                exit 1 ; \
-       fi
+       fi 
 
 .PHONY: flash_$(1)_local
 flash_$(1)_local:
@@ -261,6 +265,10 @@ flash_$(1)_local:
 .PHONY: debug_$(1)
 debug_$(1): $(OUTDIR)/$(1).elf
        $L "$(1): Debugging target"
+       $Q if [ ! -f $$($(1)_DEBUG_SCRIPT) ] ; then \
+               printf "No debug script found.\n" ; \
+               exit 1 ; \
+       fi
        $Q if [ ! "$$($(1)_PROGRAMMER_TYPE)" == "none" ] ; then \
                PROGRAMMER_CPU=$$($(1)_PROGRAMMER_CPU) PROGRAMMER_TYPE=$$($(1)_PROGRAMMER_TYPE) \
                PROGRAMMER_PORT=$$($(1)_PROGRAMMER_PORT) GDB_PORT=3333 \