More improvements to MS Windows

Now the avr-gdb, avrdude and avarice tools do not need to be in the path.
This commit is contained in:
Amilcar Lucas 2011-10-03 19:14:19 +02:00
parent c678452fe1
commit a751208f9f

View File

@ -208,6 +208,9 @@ CC := $(call FIND_TOOL,avr-gcc)
AS := $(call FIND_TOOL,avr-gcc) AS := $(call FIND_TOOL,avr-gcc)
AR := $(call FIND_TOOL,avr-ar) AR := $(call FIND_TOOL,avr-ar)
LD := $(call FIND_TOOL,avr-gcc) LD := $(call FIND_TOOL,avr-gcc)
GDB := $(call FIND_TOOL,avr-gdb)
AVRDUDE := $(call FIND_TOOL,avrdude)
AVARICE := $(call FIND_TOOL,avarice)
OBJCOPY := $(call FIND_TOOL,avr-objcopy) OBJCOPY := $(call FIND_TOOL,avr-objcopy)
ifeq ($(CXX),) ifeq ($(CXX),)
$(error ERROR: cannot find the compiler tools anywhere on the path $(TOOLPATH)) $(error ERROR: cannot find the compiler tools anywhere on the path $(TOOLPATH))
@ -412,12 +415,12 @@ all: $(SKETCHELF) $(SKETCHEEP) $(SKETCHHEX)
.PHONY: upload .PHONY: upload
upload: $(SKETCHHEX) upload: $(SKETCHHEX)
avrdude -c $(UPLOAD_PROTOCOL) -p $(MCU) -P $(PORT) -b$(UPLOAD_SPEED) -U $(SKETCHHEX) $(AVRDUDE) -c $(UPLOAD_PROTOCOL) -p $(MCU) -P $(PORT) -b$(UPLOAD_SPEED) -U $(SKETCHHEX)
configure: configure:
$(warning WARNING - A $(SKETCHBOOK)/config.mk file has been written) $(warning WARNING - A $(SKETCHBOOK)/config.mk file has been written)
$(warning Please edit the file to match your system configuration, if you use a different board or port) $(warning Please edit the file to match your system configuration, if you use a different board or port)
@echo \# Select 'mega' for the original APM, or 'mega2560' for the V2 APM. > $(SKETCHBOOK)/config.mk @echo \# Select \'mega\' for the original APM, or \'mega2560\' for the V2 APM. > $(SKETCHBOOK)/config.mk
@echo BOARD=mega >> $(SKETCHBOOK)/config.mk @echo BOARD=mega >> $(SKETCHBOOK)/config.mk
@echo \# The communication port used to communicate with the APM. >> $(SKETCHBOOK)/config.mk @echo \# The communication port used to communicate with the APM. >> $(SKETCHBOOK)/config.mk
ifneq ($(findstring CYGWIN, $(SYSTYPE)),) ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
@ -427,12 +430,16 @@ else
endif endif
debug: debug:
avarice --mkII --capture --jtag usb :4242 & \ $(AVARICE) --mkII --capture --jtag usb :4242 & \
gnome-terminal -x avr-gdb $(SKETCHELF) & \ gnome-terminal -x $(GDB) $(SKETCHELF) & \
echo -e '\n\nat the gdb prompt type "target remote localhost:4242"' echo -e '\n\nat the gdb prompt type "target remote localhost:4242"'
clean: clean:
ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
@del /S $(BUILDROOT)
else
@rm -fr $(BUILDROOT) @rm -fr $(BUILDROOT)
endif
################################################################################ ################################################################################
# Rules # Rules