mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards*: fix position of openocd variable definitions
This commit is contained in:
parent
75e828fdeb
commit
1aab4daf8f
@ -13,6 +13,9 @@ DEBUG_ADAPTER_ID ?= $(PROGRAMMER_SERIAL)
|
||||
PORT_LINUX ?= /dev/ttyUSB0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# We need special handling of the watchdog if we want to speed up the flash
|
||||
# verification by using the MCU to compute the image checksum after flashing.
|
||||
# wdog-disable.bin is a precompiled binary which will disable the watchdog and
|
||||
@ -24,6 +27,3 @@ PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
||||
|
||||
# this board uses openocd
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
@ -2,17 +2,6 @@
|
||||
PORT_LINUX ?= /dev/ttyACM0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||
|
||||
# We need special handling of the watchdog if we want to speed up the flash
|
||||
# verification by using the MCU to compute the image checksum after flashing.
|
||||
# wdog-disable.bin is a precompiled binary which will disable the watchdog and
|
||||
# return control to the debugger (OpenOCD)
|
||||
OPENOCD_PRE_VERIFY_CMDS += \
|
||||
-c 'load_image $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin 0x20000000 bin' \
|
||||
-c 'resume 0x20000000'
|
||||
PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
||||
|
||||
DEBUG_ADAPTER ?= dap
|
||||
|
||||
# Add board selector (USB serial) to OpenOCD options if specified.
|
||||
# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number.
|
||||
# Usage: SERIAL="0200..." BOARD="pba-d-01-kw2x" make flash
|
||||
@ -29,6 +18,17 @@ endif
|
||||
# setup serial terminal
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
# We need special handling of the watchdog if we want to speed up the flash
|
||||
# verification by using the MCU to compute the image checksum after flashing.
|
||||
# wdog-disable.bin is a precompiled binary which will disable the watchdog and
|
||||
# return control to the debugger (OpenOCD)
|
||||
OPENOCD_PRE_VERIFY_CMDS += \
|
||||
-c 'load_image $(RIOTCPU)/$(CPU)/dist/wdog-disable.bin 0x20000000 bin' \
|
||||
-c 'resume 0x20000000'
|
||||
PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
||||
|
||||
DEBUG_ADAPTER ?= dap
|
||||
|
||||
# The board can become un-flashable after some firmware, use connect_assert_srst
|
||||
# to always be able to flash or reset the board.
|
||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||
|
@ -7,12 +7,12 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
DEBUG_ADAPTER ?= dap
|
||||
|
||||
# this board uses openocd with an HEXFILE
|
||||
FLASHFILE ?= $(HEXFILE)
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
|
||||
# generate image checksum from hex file
|
||||
PRE_FLASH_CHECK_SCRIPT = lpc_checksum --format hex
|
||||
|
||||
# remap flash to address 0x0, otherwise it verifies the rom bootloader
|
||||
OPENOCD_PRE_VERIFY_CMDS += '-c reset init'
|
||||
|
||||
# this board uses openocd with an HEXFILE
|
||||
FLASHFILE ?= $(HEXFILE)
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
|
Loading…
Reference in New Issue
Block a user