mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
b8e04d8c00
Refactors boards/arduino-common to boards/arduino-atmega-common. Extends boards/arduino-atmega-common to be generic to all atmega based arduino boards, not just atmega328p. Removes flags that should be located in cpu framework
30 lines
1.1 KiB
Makefile
30 lines
1.1 KiB
Makefile
# include optional dependencies
|
||
include $(RIOTBOARD)/arduino-atmega-common/Makefile.dep
|
||
|
||
# define port used to flash the board
|
||
OS = $(shell uname)
|
||
ifeq ($(OS),Linux)
|
||
PORT = $(LINUX_PORT)
|
||
else ifeq ($(OS),Darwin)
|
||
PORT ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||
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
|