- moduleDict[moduleName]["harvard"] = harvard
- del moduleDefinition[const.MODULE_DEFINITION["module_harvard"]]
- moduleDict[moduleName]["constants"] = moduleDefinition
- moduleDict[moduleName]["enabled"] = False
- return toBeParsed, moduleDict
-
-def loadDefineLists(commentList):
- defineList = {}
- for comment in commentList:
+ module_dict[module_name]["harvard"] = harvard
+ del module_definition[const.MODULE_DEFINITION["module_harvard"]]
+ if const.MODULE_DEFINITION["module_hw"] in module_definition:
+ hw = module_definition[const.MODULE_DEFINITION["module_hw"]]
+ del module_definition[const.MODULE_DEFINITION["module_hw"]]
+ if type(hw) == str:
+ hw = (hw, )
+ module_dict[module_name]["hw"] = hw
+ else:
+ module_dict[module_name]["hw"] = ()
+ if const.MODULE_DEFINITION["module_supports"] in module_definition:
+ supports = module_definition[const.MODULE_DEFINITION["module_supports"]]
+ del module_definition[const.MODULE_DEFINITION["module_supports"]]
+ module_dict[module_name]["supports"] = supports
+ module_dict[module_name]["constants"] = module_definition
+ module_dict[module_name]["enabled"] = False
+ return to_be_parsed, module_dict
+
+def isSupported(project, module=None, property_id=None):
+ if not module and property_id:
+ item = project.info("CONFIGURATIONS")[property_id[0]][property_id[1]]["informations"]
+ else:
+ item = project.info("MODULES")[module]
+ tag_dict = project.info("ALL_CPU_TAGS")
+ if "supports" in item:
+ support_string = item["supports"]
+ supported = {}
+ try:
+ exec "supported = " + support_string in tag_dict, supported
+ except:
+ raise SupportedException(support_string)
+ return supported["supported"]
+ else:
+ return True
+
+def loadDefineLists(comment_list):
+ define_list = {}
+ for comment in comment_list: