Build configuration
All configuration options are provided by cmake variables, and their default
values, with docstrings, can be found in config/config_base.cmake
.
Configuration is provided in multiple stages. Each stage will not override any config that has already been set at any of the prior stages.
Command-line variable settings are applied.
If the
TFM_EXTRA_CONFIG_PATH
variable has been set, that file is loaded.If TEST_PSA_TEST is set, then PSA API test related config is applied from
config/tests/config_test_psa_api.cmake
.If it exists, CMAKE_BUILD_TYPE specific config is applied from
config/build_type/<build_type>.cmake
.Target specific config from
platform/ext/target/<target_platform>/config.cmake
is applied.If CRYPTO_HW_ACCELERATOR is set, then a config specific to the accelerator type is applied if it exists.
If it exists, TFM Profile specific config is applied from
config/profile/<tfm_profile>.cmake
.
config/config_default.cmake
is loaded.If
TEST_S
orTEST_NS
or other single test suite config likeTEST_NS_ATTESTATION
(see Tests configuration) is set, then config from${TFM_TEST_REPO_PATH}/test/config/set_config.cmake
and${TFM_TEST_REPO_PATH}/test/config/default_ns_test_config.cmake
or${TFM_TEST_REPO_PATH}/test/config/default_s_test_config.cmake
or${TFM_TEST_REPO_PATH}/test/config/default_test_config.cmake
is applied.
Warning
This means that command-line settings are not applied when they conflict with required platform settings. If it is required to override platform settings (this is not usually a good idea) then TFM_EXTRA_CONFIG_PATH should be used.