summaryrefslogtreecommitdiff
path: root/util/uut
Commit message (Collapse)AuthorAgeFilesLines
* util: Add explicit castsTom Hughes2021-09-082-3/+3
| | | | | | | | | | | | | | | | | When compiling with C++, the implicit casting that is performed in C is disallowed. Add casts in preparation for C++ compatibility. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5c25440819428db65225c772c1c5115a735db58a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864519 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> (cherry picked from commit e0a4e5ab99a45faa196b3894ade8c375061a7ab6) Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3128743
* util/uut: Fix resource leakPatrick Georgi2018-07-301-0/+1
| | | | | | | | | | Change-Id: I07b9a0eff390be97b3ee8adbc47dcc28bffa5ff9 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Found-by: Coverity Scan #187043 Reviewed-on: https://chromium-review.googlesource.com/1151119 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* util: UUT: skip writing empty segment to save the flash timeCHLin2018-06-151-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to reduce the time of programming EC image, the UUT in this CL checks each segment before it is written. If the content of the segment is empty (ie. all 0xFF), the UUT will not write the empty data to flash but only erase it. BRANCH=none BUG=none TEST=No build errors for make buildall. TEST= ------------------------------------------------------------------------ 1. Connect the servo connector (J24) on npcx7 EVB to servo board v2 via flex cable. 2. Manually turn the switch SW1.6 to "ON" on npcx7 EVB. 3. Reset ec by issuing Power-Up or VCC1_RST reset. 4. Manually turn the switch SW1.6 to "OFF" on npcx7 EVB. 5. Move npcx7_evb from array BOARDS_NPCX_7M7X_JTAG to BOARDS_NPCX_UUT in flash_ec. 6. "./util/flash_ec --board=npcx7_evb", make sure ec boots up. (Note: "ec_reset" must be removed in line 1051 of flash_ec) 5."time ./util/flash_ec --board=cheza" flash time before this CL: 1m26.489s flash time after this CL : 0m36.760s 6. Dump the flash content via JTAG, make sure it is the same as cheza's ec.bin. Change-Id: Id5ee2bd3a03d13e9b693267b03613c9f2847e0c8 Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/1095057 Commit-Ready: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* util: improve uartupdatetool (UUT) mechanismCHLin2018-05-223-87/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original UUT mechanism has the limitation that the image size cannot exceed the code RAM size. Hence, it only allows to flash the EC firmware by programming RO and RW images seperately. In this CL, we introduce the "--auto" flag in uartupdattool. It will divide the firmware into segments (4K bytes) and program the segments one by one. It also simplifies the function flash_npcx_uut() in flash_ec because some actions are moved into the uartupdatetool with auto flag enabled. BRANCH=none BUG=none TEST=No build errors for make buildall. TEST= ------------------------------------------------------------------------ 1. Connect the servo connector (J24) on npcx7 EVB to servo board v2 via flex cable. 2. Manually turn the switch SW1.6 to "ON" on npcx7 EVB. 3. Reset ec by issuing Power-Up or VCC1_RST reset. 4. Manually turn the switch SW1.6 to "OFF" on npcx7 EVB. 5. Move npcx7_evb from array BOARDS_NPCX_7M7X_JTAG to BOARDS_NPCX_UUT in flash_ec. 6. "./util/flash_ec --board=npcx7_evb" or "./util/flash_ec --board=npcx7_evb --ro" (Note: this line in flash_ec must be removed in step 6: https://chromium.googlesource.com/chromiumos/platform/ec/+/master/util/flash_ec#961) Change-Id: Ifdb6a40ef88c6a9fb435169e158fd615100237cf Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/1043825 Commit-Ready: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* util: uartupdatetool (UUT): Add tool to flash firmware by UARTCHLin2018-04-1810-0/+2363
When the FLPRG# strap pin is set to active low, and npcx7 chip is reset, it will enter uut mode. This CL adds the host tool to communicate with npcx chip in uut mode to flash ec firmware via UART port. BRANCH=none BUG=none TEST=No build errors for make buildall. TEST= ------------------------------------------------------------------------ 1. Connect the servo connector (J24) on npcx7 EVB to servo board v2 via flex cable. 2. Manually turn the switch SW1.6 to "ON" on npcx7 EVB. 3. Reset ec by issuing Power-Up or VCC1_RST reset. 4. Manually turn the switch SW1.6 to "OFF" on npcx7 EVB. 5. Move npcx7_evb from array BOARDS_NPCX_7M7X_JTAG to BOARDS_NPCX_UUT in flash_ec. 6. "./util/flash_ec --board=npcx7_evb." Change-Id: I2c588418e809e59f97ef4c3ad7ad13a3fef42f11 Signed-off-by: Dror Goldstein <dror.goldstein@nuvoton.com> Signed-off-by: CHLin <CHLIN56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/952037 Commit-Ready: CH Lin <chlin56@nuvoton.com> Tested-by: Alexandru M Stan <amstan@chromium.org> Tested-by: CH Lin <chlin56@nuvoton.com> Tested-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>