From 564fced7b8c424aadb29f069e98d5ec20d01b552 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Fri, 25 Apr 2014 10:27:48 -0700 Subject: [PATCH] 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 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 Reviewed-by: Todd Broch Commit-Queue: Vincent Palatin --- util/flash_ec | 9 +++++++-- 1 file 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)"