mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/(openmote-b/remote): migrate PORT_BSL to PROG_DEV
- Move serial.inc.mk in remote and openmote-b Makefile.include before PROG_DEV to avoid repeating OS logic check - Add deprecation warning for PORT_BSL
This commit is contained in:
parent
7794cce5ee
commit
755b4d97da
@ -1,15 +1,19 @@
|
||||
# define the default flash-tool
|
||||
export PROGRAMMER ?= cc2538-bsl
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# For backward compatibility
|
||||
ifneq (,$(PORT_BSL))
|
||||
$(warning Warning! PORT_BSL is deprecated use PROG_DEV)
|
||||
PROG_DEV ?= $(PORT_BSL)
|
||||
endif
|
||||
|
||||
ifeq ($(PROGRAMMER),cc2538-bsl)
|
||||
ifeq ($(OS),Linux)
|
||||
PORT_BSL ?= $(PORT_LINUX)
|
||||
else ifeq ($(OS),Darwin)
|
||||
PORT_BSL ?= $(PORT_DARWIN)
|
||||
endif
|
||||
RESET ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py -p "$(PORT_BSL)"
|
||||
RESET ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py -p "$(PROG_DEV)"
|
||||
FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
||||
FFLAGS = -p "$(PORT_BSL)" -e -w -v -b 115200 $(FLASHFILE)
|
||||
FFLAGS = -p "$(PROG_DEV)" -e -w -v -b 115200 $(FLASHFILE)
|
||||
else ifeq ($(PROGRAMMER),jlink)
|
||||
FLASHER = $(RIOTBOARD)/common/remote/dist/flash.sh
|
||||
FFLAGS = $(BINDIR) $(FLASHFILE)
|
||||
@ -27,5 +31,3 @@ OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|
||||
# include common remote includes
|
||||
INCLUDES += -I$(RIOTBOARD)/common/remote/include
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
@ -2,20 +2,24 @@
|
||||
PORT_LINUX ?= /dev/ttyUSB1
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# Set default flash tool
|
||||
export PROGRAMMER ?= cc2538-bsl
|
||||
|
||||
# For backward compatibility
|
||||
ifneq (,$(PORT_BSL))
|
||||
$(warning Warning! PORT_BSL is deprecated use PROG_DEV)
|
||||
PROG_DEV ?= $(PORT_BSL)
|
||||
endif
|
||||
|
||||
ifeq ($(PROGRAMMER),cc2538-bsl)
|
||||
ifeq ($(OS),Linux)
|
||||
PORT_BSL ?= $(PORT_LINUX)
|
||||
else ifeq ($(OS),Darwin)
|
||||
PORT_BSL ?= $(PORT_DARWIN)
|
||||
endif
|
||||
FLASHFILE ?= $(HEXFILE)
|
||||
FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
||||
FFLAGS = -p "$(PORT_BSL)" --bootloader-invert-lines -e -w -v -b 460800 $(FLASHFILE)
|
||||
FFLAGS = -p "$(PROG_DEV)" --bootloader-invert-lines -e -w -v -b 460800 $(FLASHFILE)
|
||||
RESET ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
||||
RESET_FLAGS ?= -p "$(PORT_BSL)" --bootloader-invert-lines
|
||||
RESET_FLAGS ?= -p "$(PROG_DEV)" --bootloader-invert-lines
|
||||
else ifeq ($(PROGRAMMER),jlink)
|
||||
# Special flashing and reset scripts are required due to board hardware
|
||||
export FLASH_ADDR = 0x200000
|
||||
@ -26,6 +30,3 @@ else ifeq ($(PROGRAMMER),jlink)
|
||||
endif
|
||||
|
||||
OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
@ -38,7 +38,7 @@ RIOT support flashing with USB by default.
|
||||
`make flash`
|
||||
|
||||
You may have to specify the flashing port with
|
||||
`PORT_BSL=<my_openmote_port> make flash`
|
||||
`PORT_DEV=<my_openmote_port> make flash`
|
||||
|
||||
### Flashing via JTAG
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user