mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #9133 from aabadie/pr/boards/riottools
boards: use RIOTTOOLS variable
This commit is contained in:
commit
5897cf09cc
@ -7,7 +7,7 @@ export PROGRAMMER_SERIAL ?= 06EB
|
||||
|
||||
# setup serial terminal
|
||||
# the debug UART is always the second tty with the matching serial number:
|
||||
PORT_LINUX ?= $(word 2,$(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh '^$(PROGRAMMER_SERIAL)'))
|
||||
PORT_LINUX ?= $(word 2,$(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(PROGRAMMER_SERIAL)'))
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
@ -23,7 +23,7 @@ export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
|
||||
export PROGRAMMER ?= cc2538-bsl
|
||||
|
||||
ifeq ($(PROGRAMMER),cc2538-bsl)
|
||||
export FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
||||
export FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
||||
export FFLAGS = -p "$(PORT)" -e -w -v $(HEXFILE)
|
||||
else ifeq ($(PROGRAMMER),jlink)
|
||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
||||
|
@ -12,7 +12,7 @@ ifeq ($(PROGRAMMER),cc2538-bsl)
|
||||
else ifeq ($(OS),Darwin)
|
||||
PORT_BSL ?= $(PORT_DARWIN)
|
||||
endif
|
||||
export FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
||||
export FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
||||
export FFLAGS = -p "$(PORT_BSL)" -e -w -v -b 115200 $(HEXFILE)
|
||||
else ifeq ($(PROGRAMMER),jlink)
|
||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
||||
|
@ -31,10 +31,10 @@ ifeq ($(PORT),)
|
||||
# try to find tty name by serial number, only works on Linux currently.
|
||||
ifeq ($(OS),Linux)
|
||||
ifneq ($(DEBUG_ADAPTER_ID),)
|
||||
PORT := $(firstword $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh '^$(DEBUG_ADAPTER_ID)$$'))
|
||||
PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(DEBUG_ADAPTER_ID)$$'))
|
||||
else
|
||||
# find-tty.sh will return the first USB tty if no serial is given.
|
||||
PORT := $(firstword $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh))
|
||||
PORT := $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh))
|
||||
endif
|
||||
else ifeq ($(OS),Darwin)
|
||||
ifneq ($(DEBUG_ADAPTER_ID),)
|
||||
|
@ -18,7 +18,7 @@ ifeq ($(PROGRAMMER),jlink)
|
||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||
else
|
||||
HEXFILE = $(BINFILE)
|
||||
export FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
||||
export FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
||||
export FFLAGS = -p "$(PORT)" -e -w -v -b 460800 $(HEXFILE)
|
||||
endif
|
||||
|
||||
|
@ -32,7 +32,7 @@ export DEBUG_ADAPTER ?= dap
|
||||
# Usage: SERIAL="0200..." BOARD="pba-d-01-kw2x" make flash
|
||||
ifneq (,$(SERIAL))
|
||||
export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
|
||||
SERIAL_TTY = $(firstword $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL)))
|
||||
SERIAL_TTY = $(firstword $(shell $(RIOTTOOLS)/usb-serial/find-tty.sh $(SERIAL)))
|
||||
ifeq (,$(SERIAL_TTY))
|
||||
$(error Did not find a device with serial $(SERIAL))
|
||||
endif
|
||||
|
@ -3,7 +3,7 @@ CPU_MODEL = nrf52832xxaa
|
||||
|
||||
# for this board, we are using Segger's RTT as default terminal interface
|
||||
USEMODULE += rtt_stdio
|
||||
TERMPROG = $(RIOTBASE)/dist/tools/jlink/jlink.sh
|
||||
TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh
|
||||
TERMFLAGS = term_rtt
|
||||
|
||||
# use shared Makefile.include
|
||||
|
@ -3,7 +3,7 @@ CPU = kinetis
|
||||
CPU_MODEL = mk20dx256vlh7
|
||||
|
||||
# custom flasher to use with the bootloader
|
||||
TEENSY_LOADER = $(RIOTBASE)/dist/tools/teensy-loader-cli/teensy_loader
|
||||
TEENSY_LOADER = $(RIOTTOOLS)/teensy-loader-cli/teensy_loader
|
||||
FLASHER = $(TEENSY_LOADER)
|
||||
|
||||
FFLAGS ?= --mcu=mk20dx256 $(HEXFILE)
|
||||
@ -18,7 +18,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial-*)))
|
||||
|
||||
$(TEENSY_LOADER):
|
||||
@echo "[INFO] teensy_loader binary not found - building it from source now"
|
||||
CC= CFLAGS= make -C $(RIOTBASE)/dist/tools/teensy-loader-cli
|
||||
CC= CFLAGS= make -C $(RIOTTOOLS)/teensy-loader-cli
|
||||
@echo "[INFO] teensy_loader binary successfully build!"
|
||||
|
||||
# setup serial terminal
|
||||
|
@ -10,5 +10,5 @@ export BAUD ?= 9600
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# flash tool configuration
|
||||
export FLASHER = $(RIOTBASE)/dist/tools/goodfet/goodfet.bsl
|
||||
export FLASHER = $(RIOTTOOLS)/goodfet/goodfet.bsl
|
||||
export FFLAGS = --telosb -c $(PORT) -r -e -I -p $(HEXFILE)
|
||||
|
@ -3,7 +3,7 @@ CPU_MODEL = nrf52832xxaa
|
||||
|
||||
# for this board, we are using Segger's RTT as default terminal interface
|
||||
USEMODULE += rtt_stdio
|
||||
TERMPROG = $(RIOTBASE)/dist/tools/jlink/jlink.sh
|
||||
TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh
|
||||
TERMFLAGS = term_rtt
|
||||
|
||||
# use shared Makefile.include
|
||||
|
@ -9,5 +9,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# setup flash tool
|
||||
export FLASHER = $(RIOTBASE)/dist/tools/goodfet/goodfet.bsl
|
||||
export FLASHER = $(RIOTTOOLS)/goodfet/goodfet.bsl
|
||||
export FFLAGS = --z1 -I -c $(PORT) -r -e -p $(HEXFILE)
|
||||
|
Loading…
Reference in New Issue
Block a user