commit | bfce32ec59d40d0e150d3cf3a86d97cf55073519 | [log] [tgz] |
---|---|---|
author | Fabio Baltieri <fabiobaltieri@google.com> | Mon Dec 23 16:09:21 2024 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Dec 24 11:22:00 2024 |
tree | 483adc119dac01aab41e5218b9f16e42dc76e863 | |
parent | 02cacd8b58b393688e50b743ef4dbe5a704a8cd5 [diff] |
west.yml: drop the segger module Thought this was needed for CONFIG_DEBUG_THREAD_INFO but that does not seem to be the case. BUG=none TEST=west build Change-Id: I7ea04da9595543a2225920f07a49ca230188b4ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec-aic-tester/+/6120267 Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
The firmware can be built and flashed both with or without the chroot, though it's recommended reusing the checkout that is part of a ChromiumOS SDK as that includes the necessary configuration to upload changes to Gerrit.
TODO
This setup reuses the repository that is part of the normal chroot setup, just adds a west workspace on top of it, which can coexist with the normal one managed with repo.
Venv setup (only needed once)
sudo apt install python3-venv python3 -m venv ~/chromiumos/src/platform/ec-aic-tester/.venv
Enter the venv (once before either setting up or building):
source ~/chromiumos/src/platform/ec-aic-tester/.venv/bin/activate
Initialize the project modules and install dependencies (only needed once):
cd ~/chromiumos/src/platform/ec-aic-tester pip install west unset ZEPHYR_BASE # only needed if there's other Zephyr checkouts in the system west init -l firmware west update -o=--depth=1 -n pip install -U -r zephyr/scripts/requirements.txt west sdk install -t arm-zephyr-eabi sudo apt install cmake ninja-build ccache dfu-util
Build and flash:
cd ~/chromiumos/src/platform/ec-aic-tester west update # only needed if there was a breaking change in the modules west build firmware west flash
It's possible to build, flash and debug the firmware without the whole chromiumos checkout, in that case just pick an arbitrary directory as a workspace instead of ~/chromiumos/src/platform/ec-aic-tester
and initialize it with west init --mf firmware/west.yml -m https://chromium.googlesource.com/chromiumos/platform/ec-aic-tester
, the rest of the process it the same.
This setup takes less disk space, but results in a checkout with no tools to upload changelists.
The firmware can be built against an existing Zephyr project checkout, in that case follow the project Getting Started Guide, make sure that the ZEPHYR_BASE
variable is set and run west build
from the project firwmare
directory.
There‘s multiple options for flashing and debugging the board firmware, depending on what’s hardware is available.
Just for flashing, uses the embedded USB DFU bootloader, requires no additional hardware. Put the board in DFU mode (press NRST while holding the BOOT0 button) and then run:
west flash -r dfu-util
JLink can be used for both flahing and debugging, requires the J-Link Software installed.
Flash with:
west flash -r jlink
or start a debugging session with
west debug -r jlink
ST-LINK requires the STM32CubeProgrammer host tools.
Flash with:
west flash -r stm32cubeprogrammer
or start a debugging session with
west debug -r stm32cubeprogrammer
TODO: verify that the ones above actually work and check if openocd works for debugging