2018-03-24 03:23:29 +01:00
|
|
|
# define the cpu used by the Mega Xplained board
|
|
|
|
export CPU = atmega1284p
|
|
|
|
|
2018-08-16 19:15:05 +02:00
|
|
|
# Found by checking fuse settings (2048 words so 4KB)
|
|
|
|
# https://www.microchip.com/DevelopmentTools/ProductDetails/atmega1284p-xpld
|
|
|
|
BOOTLOADER_SIZE ?= 4K
|
|
|
|
ROM_RESERVED ?= $(BOOTLOADER_SIZE)
|
|
|
|
|
2018-03-24 03:23:29 +01:00
|
|
|
# configure the terminal program
|
|
|
|
export PORT_LINUX ?= /dev/ttyACM0
|
|
|
|
export PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
|
|
|
export BAUD ?= 9600
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
|
|
|
export FLASHER = avrdude
|
|
|
|
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 the Bus Pirate ISP
|
|
|
|
export PROGRAMMER ?= buspirate
|
|
|
|
|
|
|
|
export PROGRAMMER_FLAGS = -P /dev/ttyUSB0
|
|
|
|
|
2018-03-27 12:28:35 +02:00
|
|
|
OFLAGS += -j .text -j .data
|
2018-03-26 17:14:40 +02:00
|
|
|
export FFLAGS += -p m1284p -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:$(HEXFILE)
|