From: duplo Date: Fri, 20 Mar 2009 15:18:22 +0000 (+0000) Subject: Use alias name for the configuration parameters and store the constants defined by... X-Git-Tag: 2.1.0~286 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=1b3996aab7178b9f9f453d0694838714180aad74;p=bertos.git Use alias name for the configuration parameters and store the constants defined by the modules git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2396 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 3e8f36ba..ac424f72 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -240,20 +240,26 @@ def loadModuleDefinition(first_comment): moduleDefinition["module_description"] = line[line.find("\\brief") + len("\\brief "):] moduleDict = {} if "module_name" in moduleDefinition.keys(): - moduleDict[moduleDefinition[const.MODULE_DEFINITION["module_name"]]] = {} - if "module_depends" in moduleDefinition.keys(): + moduleName = moduleDefinition[const.MODULE_DEFINITION["module_name"]] + del moduleDefinition[const.MODULE_DEFINITION["module_name"]] + moduleDict[moduleName] = {} + if const.MODULE_DEFINITION["module_depends"] in moduleDefinition.keys(): if type(moduleDefinition[const.MODULE_DEFINITION["module_depends"]]) == str: moduleDefinition[const.MODULE_DEFINITION["module_depends"]] = (moduleDefinition[const.MODULE_DEFINITION["module_depends"]],) - moduleDict[moduleDefinition[const.MODULE_DEFINITION["module_name"]]]["depends"] = moduleDefinition[const.MODULE_DEFINITION["module_depends"]] + moduleDict[moduleName]["depends"] = moduleDefinition[const.MODULE_DEFINITION["module_depends"]] + del moduleDefinition[const.MODULE_DEFINITION["module_depends"]] else: - moduleDict[moduleDefinition[const.MODULE_DEFINITION["module_name"]]]["depends"] = () - if "module_configuration" in moduleDefinition.keys(): - moduleDict[moduleDefinition[const.MODULE_DEFINITION["module_name"]]]["configuration"] = moduleDefinition[const.MODULE_DEFINITION["module_configuration"]] + moduleDict[moduleName]["depends"] = () + if const.MODULE_DEFINITION["module_configuration"] in moduleDefinition.keys(): + moduleDict[moduleName]["configuration"] = moduleDefinition[const.MODULE_DEFINITION["module_configuration"]] + del moduleDefinition[const.MODULE_DEFINITION["module_configuration"]] else: - moduleDict[moduleDefinition[const.MODULE_DEFINITION["module_name"]]]["configuration"] = "" + moduleDict[moduleName]["configuration"] = "" if "module_description" in moduleDefinition.keys(): - moduleDict[moduleDefinition[const.MODULE_DEFINITION["module_name"]]]["description"] = moduleDefinition["module_description"] - moduleDict[moduleDefinition[const.MODULE_DEFINITION["module_name"]]]["enabled"] = False + moduleDict[moduleName]["description"] = moduleDefinition["module_description"] + del moduleDefinition["module_description"] + moduleDict[moduleName]["consts"] = moduleDefinition + moduleDict[moduleName]["enabled"] = False return toBeParsed, moduleDict def loadDefineLists(commentList): diff --git a/wizard/mktemplates/template.mk b/wizard/mktemplates/template.mk index dc2d3ea0..863bc13a 100644 --- a/wizard/mktemplates/template.mk +++ b/wizard/mktemplates/template.mk @@ -24,6 +24,7 @@ $pname_MCU = $cpuname $pname_CSRC = \ $csrc + $main \ # $pname_PCSRC += $pcsrc