2018-05-14 19:27:10 +02:00
|
|
|
FLASHER = avrdude
|
|
|
|
DIST_PATH = $(RIOTBOARD)/$(BOARD)/dist
|
|
|
|
DEBUGSERVER_PORT = 4242
|
|
|
|
DEBUGSERVER = $(DIST_PATH)/debug_srv.sh
|
|
|
|
DEBUGSERVER_FLAGS = "-g -j usb :$(DEBUGSERVER_PORT)"
|
|
|
|
DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)"
|
|
|
|
DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT)
|
|
|
|
|
2019-02-20 21:59:06 +01:00
|
|
|
PROGRAMMER_FLAGS = -p $(subst atmega,m,$(CPU))
|
|
|
|
|
2019-02-20 21:40:40 +01:00
|
|
|
# Set flasher port only for programmers that require it
|
2017-07-03 19:23:28 +02:00
|
|
|
ifneq (,$(filter $(PROGRAMMER),arduino avr109 buspirate stk500v1 stk500v2 wiring))
|
2019-02-20 21:40:40 +01:00
|
|
|
# make the flasher port configurable (e.g. with atmelice the port is usb)
|
|
|
|
# defaults to terminal's serial port if not configured
|
2019-10-15 14:16:44 +02:00
|
|
|
PROGRAMMER_FLAGS += -P $(PROG_DEV)
|
2019-02-20 21:40:40 +01:00
|
|
|
endif
|
|
|
|
PROGRAMMER_FLAGS += $(FFLAGS_EXTRA)
|
2018-05-14 19:27:10 +02:00
|
|
|
|
|
|
|
# don't force to flash HEXFILE, but set it as default
|
|
|
|
FLASHFILE ?= $(HEXFILE)
|
2018-12-19 19:12:54 +01:00
|
|
|
FFLAGS += -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -U flash:w:$(FLASHFILE)
|