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
Marian Buschsieweke 4abc41a227
makefiles/tools: Automatically set avrdude target
The CPU variable in the boards Makefile.include file already contains the target
CPU, so there is no reason to provide it in each board again as avrdude flag.

This commit automatically sets the avrdude target from the CPU variable and
removes the unneeded flags.
2019-02-28 20:55:04 +01:00

27 lines
857 B
Makefile

# 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
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
BAUD ?= 9600
include $(RIOTMAKE)/tools/serial.inc.mk
# PROGRAMMER defaults to the external flasher Bus Pirate ISP using avrdude.
PROGRAMMER ?= buspirate
# set serial port for avrdude with buspirate
ifeq ($(OS),Linux)
AVRDUDE_PORT ?= /dev/ttyUSB0
else ifeq ($(OS),Darwin)
AVRDUDE_PORT ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
endif
# avoid error if mcu signature doesn't match
FFLAGS_EXTRA += -F
include $(RIOTMAKE)/tools/avrdude.inc.mk