1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: change PORT used for flash/debug/reset to PROG_DEV

This commit is contained in:
Francisco Molina 2019-10-15 14:29:51 +02:00
parent 755b4d97da
commit 1ae0873769
16 changed files with 26 additions and 28 deletions

View File

@ -20,7 +20,7 @@ export PROGRAMMER ?= cc2538-bsl
ifeq ($(PROGRAMMER),cc2538-bsl)
FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
FFLAGS = -p "$(PORT)" -e -w -v $(FLASHFILE)
FFLAGS = -p "$(PROG_DEV)" -e -w -v $(FLASHFILE)
else ifeq ($(PROGRAMMER),jlink)
FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
FFLAGS = $(BINDIR) $(FLASHFILE)

View File

@ -5,4 +5,4 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# reset tool configuration
RESET ?= esptool.py
RESET_FLAGS ?= --port $(PORT) --before default_reset run
RESET_FLAGS ?= --port $(PROG_DEV) --before default_reset run

View File

@ -5,4 +5,4 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# reset tool configuration
RESET ?= esptool.py
RESET_FLAGS ?= --port $(PORT) --before default_reset run
RESET_FLAGS ?= --port $(PROG_DEV) --before default_reset run

View File

@ -8,7 +8,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
export PROGRAMMER ?= olimex
MSPDEBUGFLAGS += -j $(PROGRAMMER)
ifeq ($(strip $(PROGRAMMER)),uif)
MSPDEBUGFLAGS += -d $(PORT)
MSPDEBUGFLAGS += -d $(PROG_DEV)
endif
FLASHER ?= mspdebug
FLASHFILE ?= $(HEXFILE)

View File

@ -20,6 +20,6 @@ PYTERMFLAGS += -tg
include $(RIOTMAKE)/tools/serial.inc.mk
FLASHFILE ?= $(HEXFILE)
FFLAGS = $(PORT) $(FLASHFILE)
FFLAGS = $(PROG_DEV) $(FLASHFILE)
INCLUDES += -I$(RIOTBOARD)/common/msba2/include

View File

@ -30,4 +30,3 @@ OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
# include common remote includes
INCLUDES += -I$(RIOTBOARD)/common/remote/include

View File

@ -11,4 +11,4 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# configure the flash tool
FLASHER = mspdebug
FLASHFILE ?= $(HEXFILE)
FFLAGS = -d $(PORT) -j uif "prog $(FLASHFILE)"
FFLAGS = -d $(PROG_DEV) -j uif "prog $(FLASHFILE)"

View File

@ -15,6 +15,6 @@ FLASHFILE ?= $(BINFILE)
# -u: use sector by sector erase
# -S: swap RTS and DTR
# -l 0x1ff: amount of sectors to erase
FFLAGS += -p $(PORT) -e -u -S -l 0x1ff -w $(FLASHFILE)
FFLAGS += -p $(PROG_DEV) -e -u -S -l 0x1ff -w $(FLASHFILE)
PYTERMFLAGS += --set-rts 0

View File

@ -1,18 +1,17 @@
# define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk
# custom flasher to use with the bootloader
FLASHER = $(RIOTBOARD)/$(BOARD)/dist/robotis-loader.py
DEBUGGER =
DEBUGSERVER =
FLASHFILE ?= $(BINFILE)
FFLAGS = $(PORT) $(FLASHFILE)
FFLAGS = $(PROG_DEV) $(FLASHFILE)
DEBUGGER_FLAGS =
# define the default port depending on the host OS
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# Skip the space needed by the embedded bootloader
export ROM_OFFSET ?= 0x3000
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk

View File

@ -2,6 +2,8 @@
PORT_LINUX ?= /dev/ttyUSB0
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
@ -15,8 +17,5 @@ ifeq ($(PROGRAMMER),jlink)
else
FLASHFILE ?= $(BINFILE)
FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
FFLAGS = -p "$(PORT)" -e -w -v -b 460800 $(FLASHFILE)
FFLAGS = -p "$(PROG_DEV)" -e -w -v -b 460800 $(FLASHFILE)
endif
# setup serial terminal
include $(RIOTMAKE)/tools/serial.inc.mk

View File

@ -1,8 +1,8 @@
# configure the serial interface
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
include $(RIOTMAKE)/tools/serial.inc.mk
include $(RIOTMAKE)/tools/serial.inc.mk
FLASHER = dfu-util
DEBUGGER = # spark core has no debugger
RESET ?= # dfu-util has no support for resetting the device

View File

@ -8,4 +8,4 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# flash tool configuration
FLASHER = $(RIOTTOOLS)/goodfet/goodfet.bsl
FLASHFILE ?= $(HEXFILE)
FFLAGS = --telosb -c $(PORT) -r -e -I -p $(FLASHFILE)
FFLAGS = --telosb -c $(PROG_DEV) -r -e -I -p $(FLASHFILE)

View File

@ -7,4 +7,4 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# setup flash tool
FLASHER = $(RIOTTOOLS)/goodfet/goodfet.bsl
FLASHFILE ?= $(HEXFILE)
FFLAGS = --z1 -I -c $(PORT) -r -e -p $(FLASHFILE)
FFLAGS = --z1 -I -c $(PROG_DEV) -r -e -p $(FLASHFILE)

View File

@ -196,7 +196,7 @@ ifeq ($(QEMU), 1)
else
export PROGRAMMER_SPEED ?= 460800
FLASHER = $(ESPTOOL)
FFLAGS += --chip esp32 -p $(PORT) -b $(PROGRAMMER_SPEED)
FFLAGS += --chip esp32 -p $(PROG_DEV) -b $(PROGRAMMER_SPEED)
FFLAGS += --before default_reset --after hard_reset write_flash
FFLAGS += -z -fm $(FLASH_MODE) -fs detect -ff $(FLASH_FREQ)
FFLAGS += 0x1000 $(RIOTCPU)/$(CPU)/bin/bootloader.bin

View File

@ -156,10 +156,10 @@ else
FLASH_MODE ?= dout
export PROGRAMMER_SPEED ?= 460800
FLASHER = esptool.py
FFLAGS += -p $(PORT) -b $(PROGRAMMER_SPEED) write_flash
FFLAGS += -p $(PROG_DEV) -b $(PROGRAMMER_SPEED) write_flash
FFLAGS += -fm $(FLASH_MODE)
FFLAGS += 0 $(FLASHFILE)-0x00000.bin
FFLAGS += 0x10000 $(FLASHFILE)-0x10000.bin; esptool.py -p $(PORT) run
FFLAGS += 0x10000 $(FLASHFILE)-0x10000.bin; esptool.py -p $(PROG_DEV) run
endif
OPTIONAL_CFLAGS_BLACKLIST += -fdiagnostics-color

View File

@ -1,6 +1,6 @@
FLASHFILE ?= $(BINFILE)
FLASHER ?= $(RIOTTOOLS)/bossa/bossac
FFLAGS ?= -p $(PORT) -e -i -w -v -b -R $(FLASHFILE)
FFLAGS ?= -p $(PROG_DEV) -e -i -w -v -b -R $(FLASHFILE)
# some arduino boards need to toggle the serial interface a little bit to get
# them ready for flashing...
@ -12,8 +12,9 @@ ifneq (,$(BOSSA_ARDUINO_PREFLASH))
endif
PREFLASHER ?= stty
PREFFLAGS ?= $(STTY_FLAG) $(PORT) raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
PREFFLAGS ?= $(STTY_FLAG) $(PROG_DEV) raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
FLASHDEPS += preflash
endif
# if we go with the default (BOSSA shipped with RIOT), we download and build