Merge pull request #11833 from MrKevinWeiss/boards/openmoteb/flashfix
boards/openmote-b: Fix flashing issues
This commit is contained in:
commit
294fb38381
@ -16,19 +16,20 @@ ifeq ($(PROGRAMMER),cc2538-bsl)
|
|||||||
else ifeq ($(OS),Darwin)
|
else ifeq ($(OS),Darwin)
|
||||||
PORT_BSL ?= $(PORT_DARWIN)
|
PORT_BSL ?= $(PORT_DARWIN)
|
||||||
endif
|
endif
|
||||||
|
FLASHFILE ?= $(HEXFILE)
|
||||||
FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
||||||
FFLAGS = -p "$(PORT_BSL)" --bootloader-invert-lines -e -w -v -b 460800 $(FLASHFILE)
|
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)
|
else ifeq ($(PROGRAMMER),jlink)
|
||||||
FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
# Special flashing and reset scripts are required due to board hardware
|
||||||
FFLAGS = $(BINDIR) $(FLASHFILE)
|
export FLASH_ADDR = 0x200000
|
||||||
DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
|
export JLINK_DEVICE = CC2538SF53
|
||||||
DEBUGSERVER = JLinkGDBServer -device CC2538SF53
|
export JLINK_IF = JTAG
|
||||||
RESET ?= $(RIOTBOARD)/$(BOARD)/dist/reset.sh
|
export JLINK_RESET_FILE = $(RIOTBOARD)/$(BOARD)/dist/hw_reset.seg
|
||||||
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
FLASHFILE ?= $(BINFILE)
|
|
||||||
DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
|
|
||||||
RESET_FLAGS ?= $(BINDIR)
|
|
||||||
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|
||||||
|
|
||||||
# setup serial terminal
|
# setup serial terminal
|
||||||
|
|||||||
@ -29,6 +29,9 @@ void board_init(void)
|
|||||||
gpio_init(LED1_PIN, GPIO_OUT);
|
gpio_init(LED1_PIN, GPIO_OUT);
|
||||||
gpio_init(LED2_PIN, GPIO_OUT);
|
gpio_init(LED2_PIN, GPIO_OUT);
|
||||||
gpio_init(LED3_PIN, GPIO_OUT);
|
gpio_init(LED3_PIN, GPIO_OUT);
|
||||||
|
/* The boot pin must be set to input otherwise it may lock the bootloader */
|
||||||
|
gpio_init(BOOT_PIN, GPIO_IN);
|
||||||
|
|
||||||
gpio_init(USER_BUTTON_PIN, GPIO_IN);
|
gpio_init(USER_BUTTON_PIN, GPIO_IN);
|
||||||
gpio_init(RF_SWITCH_2_4_GHZ_PIN, GPIO_OUT);
|
gpio_init(RF_SWITCH_2_4_GHZ_PIN, GPIO_OUT);
|
||||||
gpio_init(RF_SWITCH_SUB_GHZ_PIN, GPIO_OUT);
|
gpio_init(RF_SWITCH_SUB_GHZ_PIN, GPIO_OUT);
|
||||||
|
|||||||
4
boards/openmote-b/dist/hw_reset.seg
vendored
Normal file
4
boards/openmote-b/dist/hw_reset.seg
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
r0
|
||||||
|
sleep 100
|
||||||
|
r1
|
||||||
|
exit
|
||||||
@ -40,11 +40,6 @@ RIOT support flashing with USB by default.
|
|||||||
You may have to specify the flashing port with
|
You may have to specify the flashing port with
|
||||||
`PORT_BSL=<my_openmote_port> make flash`
|
`PORT_BSL=<my_openmote_port> make flash`
|
||||||
|
|
||||||
@note On some boards the MSP430 chip responsible for controlling
|
|
||||||
the bootloading pins may not be functioning. If you are only able to flash
|
|
||||||
when there is no image (either the first time after purchase or after erasing
|
|
||||||
with the jtag). Please contact the manufacturer to provide a fix.
|
|
||||||
|
|
||||||
### Flashing via JTAG
|
### Flashing via JTAG
|
||||||
|
|
||||||
To be able to flash the board via JTAG you need to install Seggers JLinkExe
|
To be able to flash the board via JTAG you need to install Seggers JLinkExe
|
||||||
@ -56,4 +51,11 @@ from your application folder.
|
|||||||
|
|
||||||
Mac OS users may experiment a command line expecting `connect`. Just type it
|
Mac OS users may experiment a command line expecting `connect`. Just type it
|
||||||
and the process will continue.
|
and the process will continue.
|
||||||
|
|
||||||
|
### Debugging
|
||||||
|
|
||||||
|
The JTAG interface is required for debugging. On some board revisions the
|
||||||
|
debug may not be able to run. To debug use:
|
||||||
|
|
||||||
|
`make debug`
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -96,6 +96,8 @@
|
|||||||
#define CCA_BACKDOOR_ENABLE (1)
|
#define CCA_BACKDOOR_ENABLE (1)
|
||||||
#define CCA_BACKDOOR_PORT_A_PIN (6) /**< BSL_BOOT Pin */
|
#define CCA_BACKDOOR_PORT_A_PIN (6) /**< BSL_BOOT Pin */
|
||||||
#define CCA_BACKDOOR_ACTIVE_LEVEL (0) /**< Active low */
|
#define CCA_BACKDOOR_ACTIVE_LEVEL (0) /**< Active low */
|
||||||
|
|
||||||
|
#define BOOT_PIN GPIO_PIN(0, CCA_BACKDOOR_PORT_A_PIN) /**< BSL_BOOT Pin */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user