diff options
author | Donald Huang <donald.huang@ite.com.tw> | 2016-05-11 18:24:29 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-05-12 00:56:35 -0700 |
commit | f36943f95acbb2f8219ae247cd1aedfb2a61a2eb (patch) | |
tree | 149cd781e93b9a2578e886ee1f7a736888aa9f52 /util | |
parent | 3ccb91fe10271f8af6f097483efac9a177d11a31 (diff) | |
download | chrome-ec-f36943f95acbb2f8219ae247cd1aedfb2a61a2eb.tar.gz |
flash_ec: Add support for it83xx_evb
Add it83xx_evb support in flash_ec script.
BRANCH=none
BUG=none
TEST=Test OK on ITE8390CX.
You can run
"~/trunk/src/platform/ec/util/flash_ec --board=it83xx_evb --image=./build/it8380dev/ec.bin"
/* ==SNAPSHOT START== */
(cr) (flashec) donald@donald-nb ~/trunk/src/platform/ec $ ~/trunk/src/platform/ec/util/flash_ec --board=it83xx_evb --image=./build/it8380dev/ec.bin
INFO: Using ec image : ./build/it8380dev/ec.bin
INFO: Flashing chip it83xx.
Waiting for the EC power-on sequence ...CHIPID 8390, CHIPVER 82, Flash size 256 kB
Done.
CHIPID 8390, CHIPVER 82, Flash size 256 kB
Erasing chip...
/100%
Writing 262144 bytes at 0x00000000
Done.
Verify 262144 bytes at 0x00000000
-100%
Verify Done.
INFO: Flashing done.
/* ==SNAPSHOT END== */
Change-Id: I0a76c0ccfcc3726796372ba3b7915a41c64d5766
Signed-off-by: Donald Huang <donald.huang@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/343985
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/flash_ec | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec index 482a2746ca..08cf175355 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -44,6 +44,11 @@ die() { exit 1 } + +BOARDS_IT83XX=( + it83xx_evb +) + BOARDS_LM4=( auron rambi @@ -182,6 +187,9 @@ elif $(in_array "${BOARDS_NRF51[@]}" "${BOARD}"); then CHIP="nrf51" elif $(in_array "${BOARDS_MEC1322[@]}" "${BOARD}"); then CHIP="mec1322" +elif $(in_array "${BOARDS_IT83XX[@]}" "${BOARD}"); then + CHIP="it83xx" + NEED_SERVO="no" elif [ -n "${FLAGS_chip}" ]; then CHIP="${FLAGS_chip}" else @@ -539,6 +547,16 @@ function flash_stm32_dfu() { $DFU_UTIL -a 0 -s ${ADDR}:${SIZE} -D "${IMG}" } +function flash_it83xx() { + + TOOL_PATH="${EC_DIR}/build/${BOARD}/util:$PATH" + ITEFLASH=$(PATH="${TOOL_PATH}" which iteflash) + if [ ! -x "$ITEFLASH" ]; then + die "no iteflash util found." + fi + sudo ${ITEFLASH} -w ${IMG} +} + function flash_lm4() { OCD_CHIP_CFG="lm4_chip.cfg" OCD_CMDS="init; flash_lm4 ${IMG} ${FLAGS_offset}; shutdown;" |