mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
8a78355482
Handle that `IMAGE_OFFSET` can be set to something that contain spaces. With 'IMAGE_OFFSET=$$((0x1000 + 0x1000))' we had in the command line when doing 'flash' --offset $((0x1000 --offset + --offset 0x1000)) With the change we correctly have --offset $((0x1000 + 0x1000))
24 lines
711 B
Makefile
24 lines
711 B
Makefile
RIOT_EDBG = $(RIOTTOOLS)/edbg/edbg
|
|
EDBG ?= $(RIOT_EDBG)
|
|
FLASHER ?= $(EDBG)
|
|
HEXFILE = $(BINFILE)
|
|
# Use USB serial number to select device when more than one is connected
|
|
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
|
|
# Usage:
|
|
# export DEBUG_ADAPTER_ID="ATML..."
|
|
# BOARD=<board> make flash
|
|
ifneq (,$(DEBUG_ADAPTER_ID))
|
|
EDBG_ARGS += --serial $(DEBUG_ADAPTER_ID)
|
|
endif
|
|
|
|
# Set offset according to IMAGE_OFFSET if it's defined
|
|
EDBG_ARGS += $(if $(IMAGE_OFFSET),--offset $(IMAGE_OFFSET))
|
|
|
|
FFLAGS ?= $(EDBG_ARGS) -t $(EDBG_DEVICE_TYPE) -b -v -p -f $(HEXFILE)
|
|
|
|
ifeq ($(RIOT_EDBG),$(FLASHER))
|
|
FLASHDEPS += $(RIOT_EDBG)
|
|
endif
|
|
RESET ?= $(EDBG)
|
|
RESET_FLAGS ?= $(EDBG_ARGS) -t $(EDBG_DEVICE_TYPE)
|