Hi Andrey,

 

Patch 21339 introduced changes of configuration order:

  1. Platform configuration via TARGET_CONFIG_HEADER_FILE.
  2. Project configuration via PROJECT_CONFIG_HEADER_FILE
  3. config_base.h

 

It means that target can’t change configuration that is expected to be changed by project. Example:

  1. Platform must redefine ITS_STACK_SIZE to satisfy driver requirements. The good way for this is to set ITS_STACK_SIZE in config_tfm_target.h.
  2. Project developer need to perform some additional debugging or profiling of the product, so the TF-M must be built with extra code that require additional stack size. It means that project developer need to #undef ITS_STACK_SIZE and then redefine it using #define ITS_STACK_SIZE. But this #undef/#define approach is not safe, because it’s possible to calculate some other settings using configuration variable in config_tfm_target.h or perform additional configuration validation by config_tfm_target.h.

 

It looks like the new changes created another bunch of problems for TF-M configuration.

 

Regards,

Roman.