Browse Source

boards/arduino*: Unifies PORT_<OS> settings

All boards define a default PORT_LINUX and PORT_DARWIN
arduino-atmega-common uses PORT_LINUX and PORT_DARWIN accordingly
patch-1
Anthony Merlino 6 years ago
parent
commit
aa1056a33b
  1. 4
      boards/arduino-atmega-common/Makefile.include
  2. 3
      boards/arduino-duemilanove/Makefile.include
  3. 3
      boards/arduino-mega2560/Makefile.include
  4. 3
      boards/arduino-uno/Makefile.include
  5. 4
      boards/arduino-zero/Makefile.include

4
boards/arduino-atmega-common/Makefile.include

@ -4,9 +4,9 @@ include $(RIOTBOARD)/arduino-atmega-common/Makefile.dep
# define port used to flash the board
OS = $(shell uname)
ifeq ($(OS),Linux)
PORT = $(LINUX_PORT)
PORT = $(PORT_LINUX)
else ifeq ($(OS),Darwin)
PORT ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
PORT ?= $(PORT_DARWIN)
else
$(info CAUTION: No flash tool for your host system found!)
# TODO: fix for building under windows

3
boards/arduino-duemilanove/Makefile.include

@ -7,7 +7,8 @@ USEMODULE += arduino-atmega-common
INCLUDES += -I$(RIOTBOARD)/arduino-atmega-common/include
#export needed for flash rule
export LINUX_PORT ?= /dev/ttyUSB0
export PORT_LINUX ?= /dev/ttyUSB0
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
export PROGRAMMER_SPEED ?= 57600
export FFLAGS += -p m328p

3
boards/arduino-mega2560/Makefile.include

@ -7,7 +7,8 @@ USEMODULE += arduino-atmega-common
INCLUDES += -I$(RIOTBOARD)/arduino-atmega-common/include
#export needed for flash rule
export LINUX_PORT ?= /dev/ttyACM0
export PORT_LINUX ?= /dev/ttyACM0
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
export PROGRAMMER_SPEED ?= 115200
export FFLAGS += -p m2560

3
boards/arduino-uno/Makefile.include

@ -7,7 +7,8 @@ USEMODULE += arduino-atmega-common
INCLUDES += -I$(RIOTBOARD)/arduino-atmega-common/include
# export needed for flash rule
export LINUX_PORT ?= /dev/ttyACM0
export PORT_LINUX ?= /dev/ttyACM0
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
export PROGRAMMER_SPEED ?= 115200
export FFLAGS += -p m328p

4
boards/arduino-zero/Makefile.include

@ -3,8 +3,8 @@ export CPU = samd21
export CPU_MODEL = samd21g18a
# set default port depending on operating system
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
export PORT_LINUX ?= /dev/ttyACM0
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup serial terminal
include $(RIOTBOARD)/Makefile.include.serial

Loading…
Cancel
Save