diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-04-25 10:27:48 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-29 03:10:54 +0000 |
commit | 564fced7b8c424aadb29f069e98d5ec20d01b552 (patch) | |
tree | 0e9cc5cd14f02bda7a7f4af7e6b837256f5c43b2 | |
parent | cce53bed31cbc0737bda852a6f98d279a4906e09 (diff) | |
download | chrome-ec-564fced7b8c424aadb29f069e98d5ec20d01b552.tar.gz |
util: fix support for dedicated debug dongle in flash_ec
When using a "non-servo" debug dongle or integrated FTDI chip to flash a STM32
microcontroller, add the option to toggle the reset of the
microcontroller if the control exists.
This was not done for the original Toad version because it cannot
control the reset line, but now Firefly, Zinger, Fruitpie debug
interfaces can do it.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=none
TEST=./util/flash_ec --board=zinger
Change-Id: Ia21e3b3403e56b4c0797582659d9a3a0c26bb8bb
Reviewed-on: https://chromium-review.googlesource.com/197050
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
-rwxr-xr-x | util/flash_ec | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/util/flash_ec b/util/flash_ec index 3bfee7c61d..aa33fb82a2 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -33,7 +33,12 @@ SERVO_TYPE=servo # reset the EC toad_hard_reset() { - info "you probably need to hard-reset your EC with Refresh+Power" + if dut_control cold_reset 2>/dev/null ; then + dut_control cold_reset:on + dut_control cold_reset:off + else + info "you probably need to hard-reset your EC manually" + fi } servo_hard_reset() { @@ -233,7 +238,7 @@ info "EC UART pty : ${EC_UART}" if dut_control boot_mode 2>/dev/null ; then SERVO_TYPE=toad - info "Using a TOAD cable" + info "Using a dedicated debug cable" fi save="$(servo_save)" |