From be47a5d85bf0bb7903e47423f6da0007f24060ed Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 28 Aug 2009 15:10:10 +0000 Subject: [PATCH] Add error messages. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2817 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/rules.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bertos/rules.mk b/bertos/rules.mk index f3171792..11f8aebb 100644 --- a/bertos/rules.mk +++ b/bertos/rules.mk @@ -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 \ -- 2.25.1