mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
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>
This commit is contained in:
committed by
chrome-internal-fetch
parent
cce53bed31
commit
564fced7b8
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user