summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorNick Sanders <nsanders@chromium.org>2016-01-13 14:09:56 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-01-14 19:52:55 -0800
commita50b12ef9743c911d968e7bf083acc22f691c7c7 (patch)
tree6fd5f7525a7769ed24f71b6fec51aba93f4d58dc /util
parent6955bfdd9b551e9fdad3b8d1673f0c3dad6f6c14 (diff)
downloadchrome-ec-a50b12ef9743c911d968e7bf083acc22f691c7c7.tar.gz
flash_ec: Allow dfu updates without servo console
flash_ec is used for both ec chips accessed over servo, and standalone stm32 devices. It's not necessary to have a servo conencted to update the standalone devices over usb. This is useful for servo v4 and servo micro. BUG=chromium:571477 TEST=Verify servo micro/discovery can be flashed without servo v2. BRANCH=none Signed-off-by: Nick Sanders <nsanders@chromium.org> Change-Id: I9deee1616d93feeac4d6675bc3a4f573d4906f7b Reviewed-on: https://chromium-review.googlesource.com/321925 Commit-Ready: Nick Sanders <nsanders@chromium.org> Tested-by: Nick Sanders <nsanders@chromium.org> Tested-by: Nick Sanders <nsanders@google.com> Reviewed-by: Wai-Hong Tam <waihong@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/flash_ec9
1 files changed, 6 insertions, 3 deletions
diff --git a/util/flash_ec b/util/flash_ec
index 7635723296..f535b7517f 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -157,6 +157,7 @@ elif $(in_array "${BOARDS_STM32[@]}" "${BOARD}"); then
CHIP="stm32"
elif $(in_array "${BOARDS_STM32_DFU[@]}" "${BOARD}"); then
CHIP="stm32_dfu"
+ NEED_SERVO="no"
elif $(in_array "${BOARDS_NPCX_JTAG[@]}" "${BOARD}"); then
CHIP="npcx_jtag"
elif $(in_array "${BOARDS_NPCX_SPI[@]}" "${BOARD}"); then
@@ -557,10 +558,12 @@ fi
IMG="$(ec_image)"
info "Using ${MCU} image : ${IMG}"
-EC_UART="$(ec_uart)"
-info "${MCU} UART pty : ${EC_UART}"
+if [ "${NEED_SERVO}" != "no" ] ; then
+ EC_UART="$(ec_uart)"
+ info "${MCU} UART pty : ${EC_UART}"
-save="$(servo_save)"
+ save="$(servo_save)"
+fi
info "Flashing chip ${CHIP}."
flash_${CHIP}