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
|
2021-02-23 15:28:27 +01:00
|
|
|
|
2021-02-18 17:55:14 +01:00
|
|
|
BOSSA_FLAGS_OPTS ?=
|
2020-03-18 14:12:31 +01:00
|
|
|
|
|
|
|
# Only use ROM_OFFSET with Bossa version 1.9
|
|
|
|
ifeq (1.9,$(BOSSA_VERSION))
|
2021-02-18 17:55:14 +01:00
|
|
|
BOSSA_FLAGS_OPTS += -o $(ROM_OFFSET)
|
2020-03-18 14:12:31 +01:00
|
|
|
endif
|
|
|
|
|
2021-02-18 17:55:14 +01:00
|
|
|
FFLAGS ?= -p $(PROG_DEV) $(BOSSA_FLAGS_OPTS) -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))
|
2020-06-05 15:47:47 +02:00
|
|
|
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
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
|