Skip to main content

resolve_base

Function resolve_base 

Source
pub fn resolve_base(
    chip: &str,
    devkit: Option<&str>,
    base_override: Option<&str>,
) -> Result<BaseDts, DataError>
Expand description

Resolves the base device tree for a chip.

Selection order, highest priority first:

  1. base_override (the [dts].base stem) — matched as .dts then .dtsi.
  2. devkit (the [profile].devkit stem) — matched as .dts then .dtsi.
  3. the generic SoC .dtsi derived from the chip part number.

§Errors

Returns DataError::UnknownChip if the chip family has no DTS directory, or DataError::UnknownDts if an explicit stem does not match any embedded file.