mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
36ca186bd1
This fixes the JTAG flasher which needs a hw_reset This is needed since the standard jtag reset command does not work Since FLASHFILE is assigned in the jlink makefile only the bsl needs something The FLASHFILE is assigned a hex since the bin takes much longer to flash
37 lines
1.2 KiB
Makefile
37 lines
1.2 KiB
Makefile
# define the cpu used by the OpenMote-B board
|
|
export CPU = cc2538
|
|
export CPU_MODEL = cc2538sf53
|
|
|
|
# define the default port depending on the host OS
|
|
PORT_LINUX ?= /dev/ttyUSB1
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
|
|
|
# Set default flash tool
|
|
export PROGRAMMER ?= cc2538-bsl
|
|
|
|
ifeq ($(PROGRAMMER),cc2538-bsl)
|
|
OS := $(shell uname)
|
|
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)
|
|
RESET ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
|
RESET_FLAGS ?= -p "$(PORT_BSL)" --bootloader-invert-lines
|
|
else ifeq ($(PROGRAMMER),jlink)
|
|
# Special flashing and reset scripts are required due to board hardware
|
|
export FLASH_ADDR = 0x200000
|
|
export JLINK_DEVICE = CC2538SF53
|
|
export JLINK_IF = JTAG
|
|
export JLINK_RESET_FILE = $(RIOTBOARD)/$(BOARD)/dist/hw_reset.seg
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
|
endif
|
|
|
|
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|
|
|
|
# setup serial terminal
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|