Google merges upstream Zephyr changes into the corresponding Chromium repository daily.
The two EC implementations currently share a significant amount code found in the following directories (all paths relative to the Chrome EC base directory platform/ec
.)
common/
- Upper-level code shared across boards and the EC implementations. This includes the following features:
driver/
- Low-level drivers for on-board peripherals controlled by the EC. This does not include any drivers for modules integrated directly into the EC chipset (such as GPIO controllers, I2C, controllers, keyboard controller). On-board peripheral drivers include:
include/
- Header files for the common/
and driver/
code
The following legacy EC directories are not used by the Zephyr EC application:
baseboard/
board/
chip/
core/
Only the Zephyr EC application uses the following directory under the platform/ec
repository:
zephyr/
The following provides an overview of the sub-directories found under zephyr/
.
zephyr/app/
- The Zephyr EC application entry point. The Zephyr kernel calls ec_app_main()
routine after initializing all kernel services and chip-level drivers,zephyr/boards/
- Contains the EC chip-level support. This directory and the organization is required by the Zephyr build system. This should not be confused with the legacy EC boards/
directory, as it does not contain any Chromebook specific board code.zephyr/cmake/
- Configuration files for the CMake build system.zephyr/drivers/
- Drivers conforming to the Zephyr device model to implement Chrome EC specific features. Google plans to eventually move these drivers upstream.zephyr/dts/
- Devicetree description files for Google's Zephyr drivers that are not yet available upstream.zephyr/emul/
- Emulator source code that has not yet been moved upstream.zephyr/include/
- Header files for files found in the zephyr/
sub-directory.zephyr/linker/
- Linker directive files used to construct the Zephyr EC binaries.zephyr/projects/
- Program-specific configurations for each program supported by Zephyr.zephyr/shim/
- Source code that adapts the legacy EC APIs to the equivalent Zephyr OS API.zephyr/subsys/
- Staging area for subsystem code that will be moved upstream.zephyr/tests/
- Host based emulation tests.zephyr/zmake/
- Source code for the zmake/
meta tool.