1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/mega-xplained/Makefile.include

30 lines
1.1 KiB
Makefile
Raw Normal View History

# define the cpu used by the Mega Xplained board
export CPU = atmega1284p
# Found by checking fuse settings (2048 words so 4KB)
# https://www.microchip.com/DevelopmentTools/ProductDetails/atmega1284p-xpld
BOOTLOADER_SIZE ?= 4K
ROM_RESERVED ?= $(BOOTLOADER_SIZE)
# 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
OFLAGS += -j .text -j .data
export FFLAGS += -p m1284p -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -F -U flash:w:$(HEXFILE)