Skip to content
Commit 6d1a9b61 authored by David Hu's avatar David Hu
Browse files

Build: Decouple option setting and check in header file config system



Option settings and checks are mixed in config_<component>.h.
config_<component>.h is then included by other components outside the
current one.
Those checks often depends on build options managed in CMake/Kconfig
config. Many of these build options are transparent to other components.
For example, if a <component> specific build option is transparent to
NSPE, when NS is built separatedly from TF-M secure side, this build
option is missing in NS build and then the corresponding checks in
config_<component>.h will fail the build.

Decouple option settings and checks to solve the issue above.
- Add #ifndef/#endif pairs in config_base.h to collect all the base
  option settings.
- Let config_tfm.h include config_base.h. It becomes the common config
  header file to be included by all components.
- Only keep invalid config check in config_<component>.h. Renamed
  config_<component>.h as config_<component>_check.h.
  Users shall explicitly set config values in PROJECT_CONFIG_HEADER_FILE
  rather than relying on components to implicitly set default values.
- config_<component>_check.h is only included by <component> for check
  only.

Change-Id: I8e447a41dee515be53f8c7458f4ada3a965ad566
Signed-off-by: default avatarDavid Hu <david.hu@arm.com>
parent 749c9a5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment