diff options
author | CHLin <CHLIN56@nuvoton.com> | 2019-08-21 18:34:53 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-26 04:50:05 +0000 |
commit | c2a4febcdcd069ec60245fdeeb248899b4dc1b9f (patch) | |
tree | 4a422c11ab9370077ed7df71be5338b985d61954 /util/uut/opr.h | |
parent | 54215f3637f4483b671282bc83f2763229710217 (diff) | |
download | chrome-ec-c2a4febcdcd069ec60245fdeeb248899b4dc1b9f.tar.gz |
util: UartUpdateTool: support "--read-flash" flag
This patch creates a table to map the chip/device ID to the size of the
internal flash. When the "--read-flash" flag is given, uut will read
the device ID and chip ID registers and use them to look up the table to
get the flash size. Afterward, uut will read the flash content from
flash according to the size and write it to the file specified by the
"--file" flag.
BUG=b:139752920
BRANCH=none
TEST=manually ran the following commands on yorp and grunt.
dut-control --port=9999 ec_ec3po_interp_connect:off
dut-control --port=9999 ccd_keepalive_en:on
dut-control --port=9999 ccd_ec_boot_mode_uut:on
dut-control --port=9999 cold_reset:on
dut-control --port=9999 cold_reset:off
dut-control --port=9999 ccd_ec_boot_mode_uut:off
./build/${BOARD}/util/uartupdatetool --port=pts/15 --baudrate=115200
--read-flash --file=<file_name>
diff ./build/yorp/ec.bin <file_name>
Change-Id: If802c76e1690af2d84edea950d3755fa87347159
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1763888
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: CH Lin <chlin56@nuvoton.com>
Tested-by: CH Lin <chlin56@nuvoton.com>
Diffstat (limited to 'util/uut/opr.h')
-rw-r--r-- | util/uut/opr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/uut/opr.h b/util/uut/opr.h index f3d630ceb4..3b166f0c7e 100644 --- a/util/uut/opr.h +++ b/util/uut/opr.h @@ -49,6 +49,7 @@ void opr_usage(void); bool opr_close_port(void); bool opr_open_port(const char *port_name, struct comport_fields port_cfg); bool opr_write_chunk(uint8_t *buffer, uint32_t addr, uint32_t size); +bool opr_read_chunk(uint8_t *buffer, uint32_t addr, uint32_t size); void opr_write_mem(uint8_t *buffer, uint32_t addr, uint32_t size); void opr_read_mem(char *output, uint32_t addr, uint32_t size); void opr_execute_exit(uint32_t addr); |