scripts: openocd.sh: align usage of OPENOCD_*_CMD variables
OPENOCD_PRE_CMD, OPENOCD_POST_CMD variables require adding '-c' in front of an actual OpenOCD command. This is in contrary to other OPENOCD_*_CMD varialbles which specify OpenOCD commands directly. This patch aligns usage of various OPENOCD_*_CMD variables. It is no longer required to add '-c' in front of OPENOCD_PRE_CMD, OPENOCD_POST_CMD variables. Change-Id: I276fab00b099694c83c3bf74aa5dd59c8d6a308b Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
parent
5f95120779
commit
ce6ad70c06
8 changed files with 9 additions and 9 deletions
|
@ -9,7 +9,7 @@ FLASH_SCRIPT = openocd.sh
|
||||||
endif
|
endif
|
||||||
DEBUG_SCRIPT = openocd.sh
|
DEBUG_SCRIPT = openocd.sh
|
||||||
|
|
||||||
OPENOCD_PRE_CMD = "-c targets 1"
|
OPENOCD_PRE_CMD = "targets 1"
|
||||||
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
||||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#FLASH_SCRIPT = openocd.sh
|
#FLASH_SCRIPT = openocd.sh
|
||||||
# ^^ Keep FLASH_SCRIPT undefined for now since flashing a self-boot image
|
# ^^ Keep FLASH_SCRIPT undefined for now since flashing a self-boot image
|
||||||
# is not yet supported by Zephyr Makefile.
|
# is not yet supported by Zephyr Makefile.
|
||||||
OPENOCD_PRE_CMD = "-c targets 1"
|
OPENOCD_PRE_CMD = "targets 1"
|
||||||
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_ICCM_BASE_ADDRESS)"
|
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_ICCM_BASE_ADDRESS)"
|
||||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_ICCM_BASE_ADDRESS)"
|
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_ICCM_BASE_ADDRESS)"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FLASH_SCRIPT = openocd.sh
|
FLASH_SCRIPT = openocd.sh
|
||||||
DEBUG_SCRIPT = openocd.sh
|
DEBUG_SCRIPT = openocd.sh
|
||||||
OPENOCD_PRE_CMD = "-c targets 1"
|
OPENOCD_PRE_CMD = "targets 1"
|
||||||
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
||||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FLASH_SCRIPT = openocd.sh
|
FLASH_SCRIPT = openocd.sh
|
||||||
DEBUG_SCRIPT = openocd.sh
|
DEBUG_SCRIPT = openocd.sh
|
||||||
OPENOCD_PRE_CMD = "-c targets 1"
|
OPENOCD_PRE_CMD = "targets 1"
|
||||||
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
||||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} $(CONFIG_FLASH_BASE_ADDRESS)"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ else
|
||||||
FLASH_SCRIPT = openocd.sh
|
FLASH_SCRIPT = openocd.sh
|
||||||
endif
|
endif
|
||||||
DEBUG_SCRIPT = openocd.sh
|
DEBUG_SCRIPT = openocd.sh
|
||||||
OPENOCD_PRE_CMD = "-c targets 1"
|
OPENOCD_PRE_CMD = "targets 1"
|
||||||
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
||||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FLASH_SCRIPT = openocd.sh
|
FLASH_SCRIPT = openocd.sh
|
||||||
DEBUG_SCRIPT = openocd.sh
|
DEBUG_SCRIPT = openocd.sh
|
||||||
OPENOCD_PRE_CMD = "-c targets 1"
|
OPENOCD_PRE_CMD = "targets 1"
|
||||||
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
||||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
FLASH_SCRIPT = openocd.sh
|
FLASH_SCRIPT = openocd.sh
|
||||||
DEBUG_SCRIPT = openocd.sh
|
DEBUG_SCRIPT = openocd.sh
|
||||||
OPENOCD_PRE_CMD = "-c targets 1"
|
OPENOCD_PRE_CMD = "targets 1"
|
||||||
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
OPENOCD_LOAD_CMD = "load_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
||||||
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME} ${CONFIG_PHYS_LOAD_ADDR}"
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,12 @@ do_flash() {
|
||||||
sh -c "${OPENOCD_CMD} -f '${OPENOCD_CONFIG}' \
|
sh -c "${OPENOCD_CMD} -f '${OPENOCD_CONFIG}' \
|
||||||
-c 'init' \
|
-c 'init' \
|
||||||
-c 'targets' \
|
-c 'targets' \
|
||||||
${OPENOCD_PRE_CMD} \
|
${OPENOCD_PRE_CMD:+-c $OPENOCD_PRE_CMD} \
|
||||||
-c 'reset halt' \
|
-c 'reset halt' \
|
||||||
-c ${OPENOCD_LOAD_CMD} \
|
-c ${OPENOCD_LOAD_CMD} \
|
||||||
-c 'reset halt' \
|
-c 'reset halt' \
|
||||||
-c ${OPENOCD_VERIFY_CMD} \
|
-c ${OPENOCD_VERIFY_CMD} \
|
||||||
${OPENOCD_POST_CMD} \
|
${OPENOCD_POST_CMD:+-c $OPENOCD_POST_CMD} \
|
||||||
-c 'reset run' \
|
-c 'reset run' \
|
||||||
-c 'shutdown'"
|
-c 'shutdown'"
|
||||||
echo 'Done flashing'
|
echo 'Done flashing'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue