2017-02-02 20:01:11 +01:00
|
|
|
|
# include optional dependencies
|
|
|
|
|
include $(RIOTBOARD)/arduino-atmega-common/Makefile.dep
|
|
|
|
|
|
2017-04-13 17:39:12 +02:00
|
|
|
|
INCLUDES += -I$(RIOTBOARD)/arduino-atmega-common/include
|
|
|
|
|
|
2017-02-02 20:01:11 +01:00
|
|
|
|
# define port used to flash the board
|
|
|
|
|
OS = $(shell uname)
|
|
|
|
|
ifeq ($(OS),Linux)
|
2017-02-02 18:01:55 +01:00
|
|
|
|
PORT = $(PORT_LINUX)
|
2017-02-02 20:01:11 +01:00
|
|
|
|
else ifeq ($(OS),Darwin)
|
2017-02-02 18:01:55 +01:00
|
|
|
|
PORT ?= $(PORT_DARWIN)
|
2017-02-02 20:01:11 +01:00
|
|
|
|
else
|
|
|
|
|
$(info CAUTION: No flash tool for your host system found!)
|
|
|
|
|
# TODO: fix for building under windows
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm
|
|
|
|
|
export TERMFLAGS ?= -b 9600 -p $(PORT)
|
|
|
|
|
export FLASHER = avrdude
|
|
|
|
|
export PORT
|
|
|
|
|
export DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
|
|
|
|
export DEBUGSERVER_PORT = 4242
|
|
|
|
|
export DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
|
|
|
|
export DEBUGSERVER_FLAGS = "-g -j usb :$(DEBUGSERVER_PORT)"
|
|
|
|
|
export DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)"
|
|
|
|
|
export DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT)
|
|
|
|
|
|
|
|
|
|
export PROGRAMMER_FLAGS = -P $(PORT) -b $(PROGRAMMER_SPEED)
|
|
|
|
|
|
|
|
|
|
export OFLAGS += -j .text -j .data -O ihex
|
|
|
|
|
export FFLAGS += -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -D -U flash:w:bin/$(BOARD)/$(PROJECT)$(APPLICATION).hex
|