Build: MINGW can be used to build/upload apm hex

This commit is contained in:
Randy Mackay 2013-03-08 15:53:09 +09:00
parent c4ea89b10a
commit 66a4f6a1ec
2 changed files with 11 additions and 7 deletions

View File

@ -85,11 +85,14 @@ HARDWARE_CORE := $(shell grep $(BOARD).build.core $(BOARDFILE) | cut -d = -f 2)
UPLOAD_SPEED := $(shell grep $(BOARD).upload.speed $(BOARDFILE) | cut -d = -f 2)
# User can define USERAVRDUDEFLAGS = -V in their config.mk to skip verification
USERAVRDUDEFLAGS ?=
#make sure the avrdude conf file is referenced correctly in cygwin
ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
USERAVRDUDEFLAGS := -C $(ARDUINO)/hardware/tools/avr/etc/avrdude.conf
else
USERAVRDUDEFLAGS ?=
endif
#make sure the avrdude conf file is referenced correctly in mingw
ifneq ($(findstring MINGW, $(SYSTYPE)),)
USERAVRDUDEFLAGS := -C $(ARDUINO)/hardware/tools/avr/etc/avrdude.conf
endif
ifeq ($(UPLOAD_PROTOCOL),)

View File

@ -10,19 +10,20 @@ ifeq ($(SYSTYPE),Darwin)
TOOLPATH := $(ARDUINOS)/hardware/tools/avr/bin
# use BWK awk
AWK = awk
FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1),$(TOOLPATH))))
endif
ifeq ($(SYSTYPE),Linux)
# expect that tools are on the path
TOOLPATH := $(subst :, ,$(PATH))
FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1),$(TOOLPATH))))
endif
ifeq ($(findstring CYGWIN, $(SYSTYPE)),CYGWIN)
TOOLPATH := $(ARDUINO)/hardware/tools/avr/bin
FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1).exe,$(TOOLPATH))))
endif
ifeq ($(findstring CYGWIN, $(SYSTYPE)),)
FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1),$(TOOLPATH))))
else
FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1).exe,$(TOOLPATH))))
ifeq ($(findstring MINGW, $(SYSTYPE)),MINGW)
TOOLPATH := $(ARDUINO)/hardware/tools/avr/bin
FIND_TOOL = $(firstword $(wildcard $(addsuffix /$(1).exe,$(TOOLPATH))))
endif
NATIVE_CXX := g++