[HELP] Encapsulating Kconfig options in Arch files
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
### 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
- [x] I have verified before submitting the report.
Contributor guide
Research direction
Review arch/arm/src/stm32h5/Kconfig and the proposed arch/arm/src/stm32h5/Kconfig.periph_select layout, then inspect how the source directive affects the menuconfig result and compilation. Done requires a project decision on whether this organization is acceptable for new development; the issue does not define an implementation task or test target.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100