2018-12-19 19:35:29 +01:00
|
|
|
FLASHFILE ?= $(BINFILE)
|
2019-05-17 13:52:34 +02:00
|
|
|
FLASHER ?= $(RIOTTOOLS)/bossa/bossac
|
2018-12-19 19:35:29 +01:00
|
|
|
FFLAGS ?= -p $(PORT) -e -i -w -v -b -R $(FLASHFILE)
|
2017-05-17 11:54:52 +02:00
|
|
|
|
|
|
|
# some arduino boards need to toggle the serial interface a little bit to get
|
|
|
|
# them ready for flashing...
|
|
|
|
ifneq (,$(BOSSA_ARDUINO_PREFLASH))
|
2017-09-28 21:29:08 +02:00
|
|
|
OS := $(shell uname)
|
|
|
|
ifeq ($(OS),Linux)
|
|
|
|
STTY_FLAG = -F
|
|
|
|
else ifeq ($(OS),Darwin)
|
|
|
|
STTY_FLAG = -f
|
|
|
|
endif
|
2017-05-17 11:54:52 +02:00
|
|
|
|
2017-09-28 21:29:08 +02:00
|
|
|
PREFLASHER ?= stty
|
|
|
|
PREFFLAGS ?= $(STTY_FLAG) $(PORT) raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
|
|
|
|
FLASHDEPS += preflash
|
2017-05-17 11:54:52 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# if we go with the default (BOSSA shipped with RIOT), we download and build
|
|
|
|
# the tool if not already done
|
2018-05-15 11:29:33 +02:00
|
|
|
ifeq ($(RIOTTOOLS)/bossa/bossac,$(FLASHER))
|
|
|
|
FLASHDEPS += $(RIOTTOOLS)/bossa/bossac
|
2017-05-17 11:54:52 +02:00
|
|
|
endif
|