@@ -117,7 +117,7 @@ def get_full_name(name, unit_name, unit_kind, label=None,
117
117
unit_name , unit_kind , label )))
118
118
prefix = temp [0 ]
119
119
# Check if the given parameter prefix matches the expected prefix
120
- if (unit_kind == "library" and prefix != unit_name ) or \
120
+ if (unit_kind == "library" and prefix not in [ unit_name , "target" ] ) or \
121
121
(unit_kind == "target" and prefix != "target" ):
122
122
raise ConfigException (
123
123
"Invalid prefix '%s' for parameter name '%s' in '%s'" %
@@ -858,21 +858,20 @@ def get_target_config_data(self):
858
858
params [full_name ].set_value (val , tname , "target" )
859
859
return params
860
860
861
- def get_lib_config_data (self ):
861
+ def get_lib_config_data (self , target_data ):
862
862
""" Read and interpret configuration data defined by libraries. It is
863
863
assumed that "add_config_files" above was already called and the library
864
864
configuration data exists in self.lib_config_data
865
865
866
866
Arguments: None
867
867
"""
868
- all_params , macros = {}, {}
868
+ macros = {}
869
869
for lib_name , lib_data in self .lib_config_data .items ():
870
- all_params .update (self ._process_config_and_overrides (lib_data , {},
871
- lib_name ,
872
- "library" ))
870
+ self ._process_config_and_overrides (
871
+ lib_data , target_data , lib_name , "library" )
873
872
_process_macros (lib_data .get ("macros" , []), macros , lib_name ,
874
873
"library" )
875
- return all_params , macros
874
+ return target_data , macros
876
875
877
876
def get_app_config_data (self , params , macros ):
878
877
""" Read and interpret the configuration data defined by the target. The
@@ -902,10 +901,9 @@ def get_config_data(self):
902
901
Arguments: None
903
902
"""
904
903
all_params = self .get_target_config_data ()
905
- lib_params , macros = self .get_lib_config_data ()
906
- all_params .update (lib_params )
907
- self .get_app_config_data (all_params , macros )
908
- return all_params , macros
904
+ lib_params , macros = self .get_lib_config_data (all_params )
905
+ self .get_app_config_data (lib_params , macros )
906
+ return lib_params , macros
909
907
910
908
@staticmethod
911
909
def _check_required_parameters (params ):
0 commit comments