summaryrefslogtreecommitdiff
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* flash_ec: change ec_reset to gsc_ec_resetstabilize-quickfix-15278.72.B-mainstabilize-15278.64.B-mainrelease-R110-15278.B-mainScott Chao2023-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | After CL:4108949, the ec_reset have changed to gsc_ec_reset. This CL will avoid flash error due to No control named "ec_reset". BUG=none BRANCH=none TEST=use c2d2 and flash ec Change-Id: I28c8c957b3a5d24b659bb5234e9538bff0898871 Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4135920 Reviewed-by: Mary Ruthven <mruthven@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Mary Ruthven <mruthven@chromium.org> (cherry picked from commit 8163dba9aebb47b2bdca455463060b947fc5c382) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4140104 Tested-by: Garry Wang <xianuowang@chromium.org> Commit-Queue: Garry Wang <xianuowang@chromium.org>
* flash_ec: add flash_mec1322Mary Ruthven2022-12-151-0/+4
| | | | | | | | | | | | | | | | mec1322 boards are still used in the lab. flash_ec needs to support them. Readd the flash_mec1322 function. BUG=b:262603036 BRANCH=none TEST=none Change-Id: I8a6ebeba19f65a3351ae9932956f2b128660dc47 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4109268 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* TCPMv2: Make VDM ACKs available to the APDiana Z2022-12-131-0/+42
| | | | | | | | | | | | | | | | | When the AP is supplying VDM REQ messages, the responses should be delivered to the AP after the message has either sent or failed to send. Add storage of the reply in the DPM. BRANCH=None BUG=b:208884535 TEST=./twister -T ./zephyr/test, on skyrim ensure VDM responses and events are seen for both successful and unsuccessful REQs Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ica713c3b3f3f571f193c1458a0e28788cd205c72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3990995 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: config_chip: Add the config of CONFIG_PLATFORM_EC_LOW_POWER_S0Tim Lin2022-12-121-1/+0
| | | | | | | | | | | | | | | Add config option which will allow entry deep sleep during S0. BUG=none BRANCH=none TEST=none Change-Id: I69d5296ca105790e6cecef5ea0d62b49f09c1ad6 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3267758 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* twister: Handle testsuite timeouts as failuresAl Semjonovs2022-12-081-0/+3
| | | | | | | | | | | | | | | | When testsuite timeouts occur, tests were being marked as skipped. Timeouts should be reported as failures using the ResultDB ABORT status. BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Change-Id: If690f6345cd3e41bf128b89d9b3d91a635fc5ed8 Signed-off-by: Al Semjonovs <asemjonovs@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4086965 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* twister: Fix preupload warningAl Semjonovs2022-12-081-4/+4
| | | | | | | | | | | | | | | | Resolve preupload failure check BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Change-Id: I4d94dcd5a42637891ab9a989fda0272e732bb234 Signed-off-by: Al Semjonovs <asemjonovs@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4083110 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Yuval Peress <peress@google.com> Reviewed-by: Yuval Peress <peress@google.com> Tested-by: Yuval Peress <peress@google.com>
* Clang: Remove lazor and gelarshie boardsDiana Z2022-12-071-2/+2
| | | | | | | | | | | | | | | | | | Both lazor and gelarshie have less than 100 bytes free in flash with their clang builds. They both have nearly 10k free flash in standard EC builds, so they should be removed until they have a similar level of cushion in clang. BRANCH=None BUG=None TEST=CQ+1 Change-Id: I7f6c4b13e4eb1e84036d558aac31ec166b377eeb Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4086967 Reviewed-by: Isaac Lee <isaaclee@google.com> Commit-Queue: Isaac Lee <isaaclee@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* ec: Support logging system boot time infoRajesh Kumar2022-12-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL add support logging system boot time and hostcommand to get boot time info. EC logs elapsed time (in micro second) info since boot for different signal events,that can be used to calculate system boot time in cold boot and warm boot scenarios. Below are the events when EC logs time info ARAIL EC turns on A-RAIL RSMRST EC releases RSMRST# ESPIRST ESPIRST received PLTRST_LOW PLTRST# asserted PLTRST_HIGH PLTRST# deasserted EC_CUR_TIME EC current time cnt increments on every warm reboot and reset to 0 on cold reboot BUG=b:249163956 BRANCH=none TEST='ectool boottime' AP console command is used to fetch data 'reboot' on AP console to trigger warm reboot 'apshutdown' on EC console to trigger cold reboot Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I47abe3f8a0b7ab43f2af11bf8387c006ba383020 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4081566 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Tested-by: Li-Yu Yu <aaronyu@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* Kconfig.battery:Add CONFIG_BATT_HOST_FULL_FACTORjeffrey2022-12-071-1/+0
| | | | | | | | | | | | | | Add CONFIG_BATT_HOST_FULL_FACTOR under the zephyr EC BUG=b:261373619 TEST=make sure full_factor:0.99 can be changed BRANCH=nissa Change-Id: Ib41107357e5e1a2949d6f5dbe16f14493be31872 Signed-off-by: jeffrey <jeffrey_lin@pegatron.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4082671 Reviewed-by: Andrew McRae <amcrae@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* twister: Set PARSETAB_DIR varJeremy Bettis2022-12-071-50/+55
| | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/zephyrproject-rtos/zephyr/issues/4513 ply.yacc isn't safe to run multiple instances at the same time unless you write the generated files to unique locations. Set PARSETAB_DIR to a temp dir, so that every run will use a unique dir. BRANCH=None BUG=b:261357312 TEST=Ran twister, verified that parsetab.py was created in /tmp Change-Id: I0adb7dae0b575bc7b425c41097806ba1ca631fa0 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4083156 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Aaron Massey <aaronmassey@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* corsola: update relevant-paths.txtEric Yilun Lin2022-12-061-2/+1
| | | | | | | | | | | | | | | | BUG=none TEST=util/update_release_branch.py -r -z --board corsla firmware- corsola-15194.B-main BRANCH=none Change-Id: I4e81d2df67f23af2e3b0895769670e0bc5f786c0 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4082466 Commit-Queue: Sung-Chi Li <lschyi@chromium.org> Tested-by: Eric Yilun Lin <yllin@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Sung-Chi Li <lschyi@chromium.org>
* twister: Populate variant portion of test resultsAl Semjonovs2022-12-052-3/+11
| | | | | | | | | | | | | | | | | Fill 'suite' of variant of test results Add 'builder_name' as part of rdb call BUG=None BRANCH=NONE TEST=./twister -T zephyr/test led get-build 8796116379492448401 | led edit-recipe-bundle | led launch https://ci.chromium.org/ui/inv/task-chromeos-swarming.appspot.com-5ee286eb4540b911/test-results Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ie949994936e7d9a656fe5629cd3ac3766f5d103f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4043343 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Zhihui Xie <zhihuixie@google.com>
* gladios: Initial EC imageTommy Chung2022-12-051-0/+1
| | | | | | | | | | | | | | | | | | Create the initial EC image for the gladios variant by copying the brask reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:239513596 BRANCH=None TEST=make BOARD=gladios Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I6af21a20a3044a371882e0bc644e6aea86558bdf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022082 Reviewed-by: Ricky Chang <rickytlchang@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* Revert "ec: Support logging system boot time info"Piotr Pawliczek2022-12-031-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c8325ba18b9f4d5b1f3f3bc739e83d8f591308cf. Reason for revert: broke at least 9 cq builds (https://ci.chromium.org/ui/p/chromeos/builders/cq/cq-orchestrator/b8795833246203447793/overview) Original change's description: > ec: Support logging system boot time info > > This CL add support logging system boot time and hostcommand to get > boot time info. > EC logs elapsed time (in micro second) info since boot for different > signal events,that can be used to calculate system boot time in cold > boot and warm boot scenarios. > > Below are the events when EC logs time info > > ARAIL EC turns on A-RAIL > RSMRST EC releases RSMRST# > ESPIRST ESPIRST received > PLTRST_LOW PLTRST# asserted > PLTRST_HIGH PLTRST# deasserted > EC_CUR_TIME EC current time > cnt increments on every warm reboot and reset to 0 on > cold reboot > > BUG=b:249163956 > BRANCH=none > TEST='ectool boottime' AP console command is used to fetch data > 'reboot' on AP console to trigger warm reboot > 'apshutdown' on EC console to trigger cold reboot > > Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> > Change-Id: I15fedbde252e0452270ef0e3fd4391bf624169f1 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3794612 > Reviewed-by: Boris Mittelberg <bmbm@google.com> > Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Bug: b:249163956 Change-Id: Ie83026c4a3a38c3dd24522901233f06e03430a54 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4077335 Reviewed-by: Jonathon Murphy <jpmurphy@google.com> Commit-Queue: Piotr Pawliczek <pawliczek@chromium.org> Tested-by: Piotr Pawliczek <pawliczek@chromium.org>
* ec: Support logging system boot time infoRajesh Kumar2022-12-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL add support logging system boot time and hostcommand to get boot time info. EC logs elapsed time (in micro second) info since boot for different signal events,that can be used to calculate system boot time in cold boot and warm boot scenarios. Below are the events when EC logs time info ARAIL EC turns on A-RAIL RSMRST EC releases RSMRST# ESPIRST ESPIRST received PLTRST_LOW PLTRST# asserted PLTRST_HIGH PLTRST# deasserted EC_CUR_TIME EC current time cnt increments on every warm reboot and reset to 0 on cold reboot BUG=b:249163956 BRANCH=none TEST='ectool boottime' AP console command is used to fetch data 'reboot' on AP console to trigger warm reboot 'apshutdown' on EC console to trigger cold reboot Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I15fedbde252e0452270ef0e3fd4391bf624169f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3794612 Reviewed-by: Boris Mittelberg <bmbm@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* twister: Allow wrapper to be used in makeJeremy Bettis2022-12-011-1/+6
| | | | | | | | | | | | | | | | | | To use the twister wrapper in GNU make and have the jobserver get passed down to twister, we need to keep the file descriptors open. BRANCH=None BUG=None TEST=Wrote makefile and added +./twister to it. Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I900c509e3c3736f4cea8a30bb9975627071ed816 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4068491 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* getversion.sh: Add private-mt-scp/... git hash for fingerprintChen-Yu Tsai2022-12-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | The MediaTek SCP firmware code has long lived under a restricted private sub-repository checked out under private-mt-scp/, however its revision was never tracked in the version string. Add support for it to getversion.sh. It now shows up as an additional "private-mt-scp:vBLAH-HASH". BRANCH=none BUG=none TEST=make BOARD=asurada_scp && strings build/cherry_scp/ec.obj | grep private-mt-scp: TEST=make BOARD=cherry_scp && strings build/cherry_scp/ec.obj | grep private-mt-scp: TEST=make BOARD=corsola_scp && strings build/cherry_scp/ec.obj | grep private-mt-scp: TEST=make BOARD=kukui_scp && strings build/cherry_scp/ec.obj | grep private-mt-scp: Change-Id: Id363f4c08f1c4a3d857eb8da19c472a88660dc24 Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060784 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util: Use libec for EC_CMD_ADD_ENTROPYTom Hughes2022-11-301-28/+15
| | | | | | | | | | | | | | | | BRANCH=none BUG=b:144959033, b:116060828 TEST=rm -rf build && make BOARD=host utils TEST=tast run firmware.FpAddEntropy Force-Relevant-Builds: all Cq-Depend: chromium:3139188 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Id5cebe9dbc174d486474c5e9fd40b8f517b05e19 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3938416 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Andrea Grandi <agrandi@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: Remove CONFIG_PLATFORM_EC_FPUMark Hasemeyer2022-11-291-0/+1
| | | | | | | | | | | | | | | Remove CONFIG_PLATFORM_EC_FPU. Use Zephyr's CONFIG_FPU option instead. BUG=b:217926701 BRANCH=none TEST=twister -T zephyr/test/ TEST=zmake compare-builds -a Signed-off-by: Mark Hasemeyer <markhas@google.com> Change-Id: Icd0fdbc440f0dd574b75bf5ca0f1750f1e858b40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049382 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* test: unit test uart_printf.cYuval Peress2022-11-291-0/+1
| | | | | | | | | | | | | | Add unit tests to get uart_printf.c to 100% coverage. BRANCH=none BUG=none TEST=twister LOW_COVERAGE_REASON=the lines showing up as red are tested by existing tests. I'm not sure why those tests don't count towards this CL. Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I6fc4321a7a46836f212c285aca67c71613011b95 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4009401 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* board/burnet: Free up flash spaceTom Hughes2022-11-291-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:172020503 TEST=CC=clang make BOARD=burnet Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If04c6b209990822ccad384a1a6cbd66870eefcaa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4024564 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: update cmake toolchain for unittest coverageYuval Peress2022-11-291-0/+4
| | | | | | | | | | | | | | | Add support for unittest coverage in our own toolchain. BRANCH=none BUG=none TEST=./twister -c -v -i --gcc -p unit_testing -C TEST=./twister -c -v -i --llvm -p unit_testing -C Change-Id: I3e7ffd7bbea809ae9c6ab1d9b6e6104627245abf Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060364 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* crash_analyzer: improve the assert caseBoris Mittelberg2022-11-281-11/+16
| | | | | | | | | | | | | | Detecting PC in case of assert (cause 3) from r3 BRANCH=none BUG=none TEST=manually on redrix crash reports Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: Ifab41cfd081dd61a18db9cee2cd83b5e58fa06ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4053343 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Ricardo Quesada <ricardoq@chromium.org>
* build: update build cmake files for unit testsYuval Peress2022-11-251-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding the unittest Zephyr component now updates the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER values. This means that find_package needs to be called prior to any of the test library commands so the right compiler is set for all the libraries. Twister launcher no longer needs to set the compiler as an argument to CMake. zephyr/cmake compiler and toolchain required updates to play nice with posix/unit_testing architectures. These included: 1. Conditionally adding the -fno-PIC flag 2. Setting CMAKE_CXX_COMPILER for clang 3. Adding a unit_testing cross compile target to the llvm and host toolchain BRANCH=none BUG=none TEST=./twister Cq-Depend: chromium:4047569 Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Ib1e8ddcb526a56c05ef925d4d9ab97cb65004038 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4050266 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: twister: Optimization - Reduce test search scopeTristan Honscheid2022-11-231-3/+6
| | | | | | | | | | | | | | | | | | | Currently we ask twister to search the entire EC directory for testcase.yaml files, which takes nearly 3 seconds according to the profiler (this figure is also influenced by how many build artifacts and other stuff a developer may have in that directory). This CL limits the search scope to directories we know have testcase.yaml files. The os.walk() phase now takes negligible time. BRANCH=None BUG=b:259442204 TEST=./twister and checking that 89 scenarios are run Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Ibfc5ce9aa976cc3527d7c168bd0b29ff531ef46c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4031147 Reviewed-by: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* ec: Don't build jacuzzi with clangJeremy Bettis2022-11-231-1/+1
| | | | | | | | | | | | | | | | | | It runs out of flash space, even though gcc has 4k free. BRANCH=None BUG=b:256761895 TEST=cq Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I2eef09da98a05a1aaae9f788c4f732e45725b200 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4049890 Commit-Queue: Piotr Pawliczek <pawliczek@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Piotr Pawliczek <pawliczek@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* util: Remove corori2 from list of boards that build with clangScott Collyer2022-11-221-1/+1
| | | | | | | | | | | | | | | | | The CQ is failing to compile this board. Remove this board from list of boards that compile with clang. BRANCH=none BUG=b:172020503 TEST=make buildall Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ia12ddaa983601185ffc760ada9fb12bbfecd3b9a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4043729 Commit-Queue: Scott Collyer <scollyer@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org>
* ec/util: Sort header filesJeremy Bettis2022-11-2211-44/+49
| | | | | | | | | | | | | | | | | | | | Sort all headers in ec/util with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j$(nproc) buildall_only runtests TEST=zmake compare-builds Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I0d733569f765f2a339a694b2d4e5720820e7aaa8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4043733 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* util: Redirect stdin for clang_formatJeremy Bettis2022-11-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | If the pattern passed to check_clang_format.py has no files, clang-format will wait for a file on stdin, so redirect stdin from /dev/null instead. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j$(nproc) buildall_only runtests TEST=zmake compare-builds Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ia2634f60d85e963686158e79dd352694b3b45a84 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4043734 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tomasz Michalec <tmichalec@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* twister: Check '.config' file for selected configsAl Semjonovs2022-11-221-5/+7
| | | | | | | | | | | | | Use '.config' file instead of 'autoconf.h' for selected configs BUG=b:239952573 BRANCH=None TEST=./twister -T zephyr/test/ Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ia981aafec6902c47e6abf2a9ec5ee6c189e94fe6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4043738 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: add the gesture host detection KconfigJosh Tsai2022-11-221-1/+0
| | | | | | | | | | | | | | | | | | | If we need to get the body detection status via ectool, need to enable the CONFIG_GESTURE_HOST_DETECTION. This change add the Kconfig to enable the gesture host detection function in zephyr. BRANCH=none BUG=b:236668095;b:232946420 TEST=zmake build winterhold Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: Id7ae11321b6128b7aba4f6a47897e6cb1ea2f2d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3928570 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: Kconfig: Add body detectionJosh Tsai2022-11-221-8/+0
| | | | | | | | | | | | | | | | | | Add the body detection related configuration to Kconfig BRANCH=none BUG=b:236668095;b:232946420 TEST=zmake build winterhold Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Change-Id: Ic44154d556a89c1779bd16cbf07b15558f63f8f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3868870 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Ching-Kang Yen <chingkang@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* twister: RDB expects duration to be populated in unit of secondsAl Semjonovs2022-11-211-1/+1
| | | | | | | | | | | | | | Populate RDB duration in units of seconds BUG=None BRANCH=NONE TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I4dc8c9c2ea8e6620940979f035e1271cab77b13b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4043342 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Tristan Honscheid <honscheid@google.com>
* twister: Upload full test suite logs to ResultDBAl Semjonovs2022-11-181-5/+22
| | | | | | | | | | | | | | Include full testsuite log with test results BUG=b:248067639 BRANCH=NONE TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I7cf0413ba4479fd09770851988c77e9206f8e923 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4033066 Reviewed-by: Simon Glass <sjg@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* twister: Add config to tags for testsAl Semjonovs2022-11-181-5/+35
| | | | | | | | | | | | | | | Parse autoconf.h to add testsuite configuration as tags for the test BUG=b:239952573 BRANCH=NONE TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I964c0e7e1f5c50435075e5c76fb29426eb54d184 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4032746 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* twister: Add tags to enable TesthausAl Semjonovs2022-11-182-2/+28
| | | | | | | | | | | | | | | Add queued_time and board tags to test results Example twister.json format -- go/paste/5260283562950656 BUG=b:247857971 BRANCH=None TEST=./twister -T zephyr/test Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ia252aa72fa433e13ec45e4d9470d96370888ad00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4032325 Reviewed-by: Zhihui Xie <zhihuixie@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* util/build_with_clang: More boards unsuccessfully compileFabio Baltieri2022-11-181-6/+6
| | | | | | | | | | | | | | | These boards were at the very limit of flash usage when compiled with clang and are now over the limit and failing in CI. BRANCH=none BUG=b:258143176 TEST=./util/build_with_clang.py Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I7f532fd60ce9fad0be3c323efcd3b23d77b23242 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4034172 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* util/build_with_clang: More boards successfully compileTom Hughes2022-11-171-16/+15
| | | | | | | | | | | | BRANCH=none BUG=b:172020503 TEST=./util/build_with_clang.py Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ie096e68f8e2f1287aac04babf63e2759039e591d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4024041 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* util: Improve uart_stress_tester.pyEdward Hill2022-11-171-6/+5
| | | | | | | | | | | | | | | Adjust prompt detection and cleanup to work with AP UART, not just EC UART. BUG=b:227228605 BRANCH=none TEST=uart_stress_tester.py -t 10 -d <raw_ec_uart> <raw_cpu_uart> Change-Id: I9041e926b11e287942fe3152652fc38e2df7b1d2 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4032321 Reviewed-by: Mark Hasemeyer <markhas@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* util/build_with_clang: Add option to remove build directoryTom Hughes2022-11-161-1/+20
| | | | | | | | | | | | | | | By default remove the build directory, but allow disabling it with a flag. BRANCH=none BUG=b:172020503 TEST=./util/build_with_clang.py Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0342768da9e340aa4d84bb695cc97550e305326d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4026667 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: Add check for twister.json before using itAl Semjonovs2022-11-161-33/+38
| | | | | | | | | | | | | | | | Check if twister.json exists before parsing for test results and skipped tests BUG=None BRANCH=NONE TEST=./twister -T zephyr/test/math ./twister -T zephyr/test/math_not_exist Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ifc3983d4ceb085d76dd0a5c7ee1937508caaa2b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4025838 Reviewed-by: Tristan Honscheid <honscheid@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* util: Log command at debug levelJeremy Bettis2022-11-161-0/+2
| | | | | | | | | | | | | | | | | | You can run util/check_clang_format --debug to see the command that is run. BRANCH=None BUG=None TEST=util/check_clang_format --debug Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: If99ccfc700928ab6ce10802e869e170878853351 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4026666 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* update_release_branch: Fix commit message and Zephyr OWNERSAndrew McRae2022-11-161-9/+15
| | | | | | | | | | | | | | | | | | Allow the relevant commits portion of the commit message to be optional (not used for the zephyr main/cmsis repos). Also prune any top level Zephyr OWNERS file changes to avoid conflicts with expected modified branch OWNERS file. BUG=b:257145337 TEST=Run for nissa firmware branch BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ic38ff025d7d57a8f2439d535bebd55a5be12935c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022998 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* util: Allow passing files to check_clang_formatJeremy Bettis2022-11-151-1/+6
| | | | | | | | | | | | | | | | | For example to reformat all of the files in zephyr/test run: ./util/check_clang_format.py --fix zephyr/test BRANCH=None BUG=b:247100970 TEST=./util/check_clang_format.py --fix zephyr/test Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ic812ad08ff2955b77ea95c2a870934d45ee74e07 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022251 Reviewed-by: Tristan Honscheid <honscheid@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* util: Add libec supportTom Hughes2022-11-152-0/+13
| | | | | | | | | | | | | | | | | | libec needs a file descriptor for running commands. This comm_get_fd() API will allow us to use libec in ectool. Also add the necessary compile and link flags to use libec. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I746e0ac6b9dc30d920bbda87e581a695d83fd300 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4009404 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Andrea Grandi <agrandi@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* update_release_branch: Add support for Zephyr based boardsAndrew McRae2022-11-151-116/+222
| | | | | | | | | | | | | | | | | | | Add support for Zephyr based projects: - Add srcbase option for source directory base (requires SDK) - Add multiple repo handling - Use appropriate defaults for Zephyr - Use correct branch name and remote branch names - Skip repo if no changes (cmsis doesn't change much) BUG=b:257145337 TEST=Run with nissa firmware branch BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I7070afd2dca11b9afe0891900d1f209b749b3525 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4015604 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* board/nocturne: Enable LTOTom Hughes2022-11-151-1/+1
| | | | | | | | | | | | | BRANCH=none BUG=b:172020503 TEST=make BOARD=nocturne Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I19b0c772380336cdcd8b9d219386df21f859a7a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4021113 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* board/gelarshie: Free up more flash spaceTom Hughes2022-11-151-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:172020503 TEST=CC=clang make BOARD=gelarshie Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ib483bc193fea2737a1c1add0695327b014727e89 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4024038 Reviewed-by: Edward Hill <ecgh@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* util: add support for LR and PC in crash reportsRicardo Quesada2022-11-141-1/+12
| | | | | | | | | | | | | | | | Some crash reports (E.G: Coral) contain LR and PC valid registers. This CL uses them, when available, to process the PC symbol. BUG=b:259112884 TEST=crash_analyzer.py lite -m coral_113.map -f dumps_coral/ It correctly found the PC for the crashes. BRANCH=none Change-Id: I9d02a090bb4bf37dc18128cdec75e52fecb81fde Signed-off-by: ricardoq@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4022249 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* board/waddledoo: Free up flash spaceTom Hughes2022-11-141-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:172020503 TEST=CC=clang make BOARD=waddledoo Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I8b088e83c95c3874c461c3efe34345399f5074c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4024562 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>