Skip to content

Configuration HAS_DTS has no function, preventing compile for vendors without device tree #34416

@mtpr-ot

Description

@mtpr-ot

DTS has been made mandatory, however certain vendors do not want to go down that road.
Where an empty device tree in certain configurations is sufficient, in others, the number of hacks needed to compile is unreasonable.

Expected behavior
It should be possible to use- and unset the existing CONFIG_HAS_DTS to compile zephyr on vendor platforms.

Impact
Currently a local hack is used to compile without DTS. This can quickly be made into a PR if accepted (the "if/endif" added to CMakeLists.txt):

if(CONFIG_HAS_DTS)
  # dev_handles.c is generated from ${ZEPHYR_PREBUILT_EXECUTABLE} by
  # gen_handles.py
  add_custom_command(
    OUTPUT dev_handles.c
    COMMAND
    ${PYTHON_EXECUTABLE}
    ${ZEPHYR_BASE}/scripts/gen_handles.py
    --output-source dev_handles.c
    --kernel $<TARGET_FILE:${ZEPHYR_PREBUILT_EXECUTABLE}>
    --zephyr-base ${ZEPHYR_BASE}
    DEPENDS ${ZEPHYR_PREBUILT_EXECUTABLE}
    )
  set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES dev_handles.c)
endif()

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions