Skip to content

SCP Config with Device Tree v4

Mike Leach requested to merge ml/device-tree-config-v4 into main

This set of changes adds in tooling and adjusts build flow to allow modules to be configured using device tree elements instead of direct programming of configuration structures.

Provides example in the form of changes to the Juno product.

The build flow processes an input device tree, using python libraries taken from the Zephyr project, to create a set of macros representing values in the device tree sources. These values are then extracted at compile time using a set of APIs (also in macro form) to populate the data structures previously hand written as C code.

This process makes module configuration code re-useable. Additional generic configuration code for all framework modules is in the module/config_dt_common directory, and the product/juno/module/config_dt_common for juno specific modules. These directories contain CMakelists that build config code into modules as required. This is the key change from v3, which minimises changes to other CMakelist files in the system.

Modules to use DT as a configuration mechanism can be selected on a per basis, and per module basis, allowing a mix of DT and traditional module configuration. This further allows modules to be converted on an as needed basis.

Documentation explaining the new build flow and conventions used is provided.

Edited by Mike Leach

Merge request reports