2020-02-25 11:48:10 +01:00
|
|
|
BOSSA_VERSION ?= 1.9
|
2018-12-19 19:35:29 +01:00
|
|
|
FLASHFILE ?= $(BINFILE)
|
2020-02-25 11:48:10 +01:00
|
|
|
FLASHER ?= $(RIOTTOOLS)/bossa-$(BOSSA_VERSION)/bossac
|
|
|
|
FFLAGS ?= -p $(PROG_DEV) -o $(ROM_OFFSET) -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
|
|
|
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
|
2019-10-15 14:29:51 +02:00
|
|
|
PREFFLAGS ?= $(STTY_FLAG) $(PROG_DEV) raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
|
2017-09-28 21:29:08 +02:00
|
|
|
FLASHDEPS += preflash
|
2019-10-15 14:29:51 +02:00
|
|
|
|
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
|
2020-02-25 11:48:10 +01:00
|
|
|
ifeq ($(RIOTTOOLS)/bossa-$(BOSSA_VERSION)/bossac,$(FLASHER))
|
|
|
|
FLASHDEPS += $(FLASHER)
|
2017-05-17 11:54:52 +02:00
|
|
|
endif
|