Skip to content

[HELP] Encapsulating Kconfig options in Arch files #16202

@stbenn

Description

@stbenn

Description

For arch configuration, is it acceptable to use separate Kconfig files for logical blocks of the configuration? I am not proposing rework of already implemented Kconfig files, but would it be acceptable for new development?

I experimented with the H5 arch and it appears to work just fine. I moved the peripheral selection menu options from arch/arm/src/stm32h5/Kconfig to a new file arch/arm/src/stm32h5/Kconfig.periph_select. Then replaced the original Kconfig options with source arch/arm/src/stm32h5/Kconfig.periph_select. The menu inside menuconfig remained the same, and it compiled without issue.

Reason for wanting to do this: The H5 Kconfig is currently ~5k lines long, and will continue to expand as we add support for more peripherals. Encapsulating some of the options into separate files would make it easier to parse and validate configuration options.

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions