2016-03-20 14:36:15 +01:00
|
|
|
# define the cpu used by the waspmote pro board
|
|
|
|
export CPU = atmega1281
|
|
|
|
|
2017-05-18 15:46:38 +02:00
|
|
|
# configure the terminal program
|
|
|
|
PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
|
|
|
BAUD ?= 9600
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
2016-03-20 14:36:15 +01:00
|
|
|
# define tools used for building the project
|
|
|
|
export PREFIX = avr-
|
|
|
|
export CC = $(PREFIX)gcc
|
|
|
|
export CXX = $(PREFIX)c++
|
|
|
|
export AR = $(PREFIX)ar
|
|
|
|
export AS = $(PREFIX)as
|
|
|
|
export LINK = $(PREFIX)gcc
|
|
|
|
export SIZE = $(PREFIX)size
|
|
|
|
export OBJCOPY = $(PREFIX)objcopy
|
|
|
|
|
2017-05-18 15:46:38 +02:00
|
|
|
export FLASHER = avrdude
|
2016-03-20 14:36:15 +01:00
|
|
|
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)
|
|
|
|
|
|
|
|
# PROGRAMMER defaults to stk500v1 which is the internal flasher via USB. Can be
|
|
|
|
# overridden for debugging (which requires changes that require to use an ISP)
|
|
|
|
export PROGRAMMER ?= stk500v1
|
|
|
|
|
|
|
|
ifeq ($(PROGRAMMER), stk500v1)
|
2017-09-22 14:52:12 +02:00
|
|
|
export PROGRAMMER_FLAGS = -P $(PORT) -b 115200
|
2016-03-20 14:36:15 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
export OFLAGS += -j .text -j .data -O ihex
|
|
|
|
export FFLAGS += -p m1281 -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:bin/$(BOARD)/$(PROJECT)$(APPLICATION).hex
|