| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling with C++ _GNU_SOURCE is already defined, which generates
a compiler error:
util/comm-i2c.cc:6:9: error: '_GNU_SOURCE' macro redefined
[-Werror,-Wmacro-redefined]
^
<built-in>:393:9: note: previous definition is here
^
For details on why g++ always defines _GNU_SOURCE on Linux see
https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined
BRANCH=none
BUG=b:144959033
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: If7c2f241562a093d4acf32ccccdf247092458fdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2869429
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:144959033
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I60f5f9211fb48391c1595a6a796596fa4471025f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2864515
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A long is 32-bit, but a long long is 64-bit. The function name should be
strtoull if it is returning 64 bits of data.
BRANCH=none
BUG=b:172592963
TEST=builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I04c40f9256ed37eb1cf9b6bd1b0ef0320fe49b0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530874
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uut maintains a mapping table to look up the internal flash size with
the device id (chip variant.) This CL adds a new entry in the table for
npcx993f & npcx996f.
BRANCH=none
BUG=b:165777478
TEST=pass "make buildall"
TEST="./build/npcx9_evb/util/uartupdatetool --port=pts/15
--baudrate=115200 --read-flash --file=<file_name>"
"diff ./build/npcx9_evb/ec.bin <file_name>"
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Signed-off-by: CHLin <CHLin56@nuvoton.com>
Change-Id: Iccaa2068dfba8382fe0885ffc2f8105345f73de9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2393402
Reviewed-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: caveh jalali <caveh@chromium.org>
Commit-Queue: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uut maintains a mapping table to look up the internal flash size with
the device id (chip variant.) This CL adds a new entry in the table for
npcx7m7fc.
BRANCH=none
BUG=b:163910671
TEST=pass "make buildall"
TEST="./build/npcx7_evb/util/uartupdatetool --port=pts/15
--baudrate=115200 --read-flash --file=<file_name>"
"diff ./build/npcx7_evb/ec.bin <file_name>"
Signed-off-by: CHLin <CHLin56@nuvoton.com>
Change-Id: I09d8763f5f54d364ecafd17135d8ea00de89da30
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2355158
Tested-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: caveh jalali <caveh@chromium.org>
Commit-Queue: CH Lin <chlin56@nuvoton.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Google is working to change its source code to use more inclusive
language. To that end, replace the term "dummy" with inclusive
alternatives.
BUG=b:162781382
BRANCH=None
TEST=make -j buildall
`grep -ir dummy *`
The only results are in "private/nordic_keyboard/sdk8.0.0"
which is not our code.
Signed-off-by: Sam Hurst <shurst@google.com>
Change-Id: I6a42183d998e4db4bb61625f962867fda10722e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2335737
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found by Coverity Scan #1194{41,48,49,50,53,54,55}
BUG=none
BRANCH=none
TEST=none
Change-Id: I8fee672359f7b13639d09e603f3aaa11de05e820
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1781468
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The upload hooks complained about using the function name in the
string, asking to use __file__ instead.
BUG=none
BRANCH=none
TEST=repo upload is happy now
Change-Id: I089e3acd3015cfea74439b2cccd5bb07eb5a4045
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1781467
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uartupdatetool won't ignore trailing white space.
It will erase flash segments for sure corresponding to that part.
BUG=b:139884342
BRANCH=None
TEST=manually ran flash_ec on hatch through ccd with two different
binaries: one ${IMG1} has less trailing 0xFF space than the other
${IMG2}.
flash_ec --board hatch --image ${IMG1} --verify
flash_ec --board hatch --image ${IMG2} --verify
Change-Id: Id25a9e05a2d2df76255dd688f829dee48dc819cf
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1766099
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch increases the number of device sync attempts from two to
three.
It is to be tolerant on the first command failure because of USB
DATA PID mismatch that could happen from USB reconnection.
BUG=b:135617689
BRANCH=none
TEST=Tested on Hatch and Kohaku, Octopus and Grunt.
$ ./util/flash_ec --board hatch --image ${IMG}
...
Performing a Host/Device synchronization check...
Host/Device synchronization failed, error = 1.
Writing [784] bytes in [4] packets
...
INFO: Flashing done.
INFO: Restoring servo settings...
The first attempt runs good.
Disconnect Suzy-Q cable, and reconnect it, and run it again:
$ ./util/flash_ec --board hatch --image ${IMG}
Before this patch, it used to fail:
...
Performing a Host/Device synchronization check...
Host/Device synchronization failed, error = 2.
Host/Device synchronization failed, error = 1.
ERROR: Failed to load monitor binary.
INFO: Restoring servo settings...
After this patch, it succeeds:
...
Performing a Host/Device synchronization check...
Host/Device synchronization failed, error = 2.
Host/Device synchronization failed, error = 1.
Writing [784] bytes in [4] packets
...
INFO: Flashing done.
INFO: Restoring servo settings...
Change-Id: Id8e7041a5cb08075129148ddba5e8cf12f3aae54
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1755182
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=none
Change-Id: Ic6aaa62f3818d544be3f3bd5f99f8063326c3f10
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Found-by: Coverity Scan #199447
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1725956
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
Auto-Submit: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=none
Change-Id: I6965fda01b45bc15146103564c6eea271c65f96f
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Found-by: Coverity Scan #1994{41,43,44,45,46,49,51,56,57}
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1725952
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Auto-Submit: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a workaround fix for grunt, where the first command after EC
reset gets zero bytes as response.
BUG=b:126795953
BRANCH=none
TEST=manually ran flash_ec on grunt/careena, grunt/liara and
octopus/fleex through servo_v4_with_ccd_cr50 or suzy-Qable.
Change-Id: I5da3bd7889d9e4059a8f523352db4f3e5a7ce841
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1583128
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cr50 doesn't handle the uart break conditions properly, so it will fill
up the EC uart with zeros when ECTX_CR50RX stays asserted. We assert
that signal to start uut programming, so the buffer is almost guaranteed
to be filled with garbage when uut programming starts. We were seeing
synchronization fail because the baudrate check would read a zero from
the buffer instead of the expected output. This change completely drains
the EC console before starting uut to get rid of the garbage that
interferes with programming.
stm32mon does the exact same thing. We should create common code for
initializing serial devices.
BUG=b:123775217
BRANCH=none
TEST=program cheza using ccd uut
Change-Id: I2df562a5b4513ada528e887e057e78a8f1f3054c
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1457579
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|