From: duplo Date: Fri, 20 Mar 2009 17:01:52 +0000 (+0000) Subject: Choose PCSRC or CSRC compilation for harvard cpus X-Git-Tag: 2.1.0~282 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=5caada91ff327558e599950dcf058d516ed88cb7;p=bertos.git Choose PCSRC or CSRC compilation for harvard cpus git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2400 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index e522bdf9..b872cf15 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -108,9 +108,9 @@ def makefileGenerator(projectInfo, makefile): def csrcGenerator(projectInfo): modules = projectInfo.info("MODULES") if "harvard" in projectInfo.info("CPU_INFOS")["CPU_TAGS"]: - pcsrc_need = projectInfo.info("CPU_INFOS")["PC_SRC"] + harvard = True else: - pcsrc_need = [] + harvard = False csrc = [] pcsrc = [] constants = {} @@ -120,19 +120,22 @@ def csrcGenerator(projectInfo): constants.update(information["constants"]) for filename, path in findDefinitions(module + ".c", projectInfo): path = path.replace(projectInfo.info("SOURCES_PATH"), projectInfo.info("PROJECT_PATH")) - csrc.append(path + "/" + filename) - if module in pcsrc_need: + if not harvard or "harvard" not in information or information["harvard"] == "both": + csrc.append(path + "/" + filename) + if harvard and "harvard" in information: pcsrc.append(path + "/" + filename) for filename, path in findDefinitions(module + "_" + projectInfo.info("CPU_INFOS")["TOOLCHAIN"] + ".c", projectInfo): path = path.replace(projectInfo.info("SOURCES_PATH"), projectInfo.info("PROJECT_PATH")) - csrc.append(path + "/" + filename) - if module in pcsrc_need: + if not harvard or "harvard" not in information or information["harvard"] == "both": + csrc.append(path + "/" + filename) + if harvard and "harvard" in information: pcsrc.append(path + "/" + filename) for tag in projectInfo.info("CPU_INFOS")["CPU_TAGS"]: for filename, path in findDefinitions(module + "_" + tag + ".c", projectInfo): path = path.replace(projectInfo.info("SOURCES_PATH"), projectInfo.info("PROJECT_PATH")) - csrc.append(path + "/" + filename) - if module in pcsrc_need: + if not harvard or "harvard" not in information or information["harvard"] == "both": + csrc.append(path + "/" + filename) + if harvard and "harvard" in information: pcsrc.append(path + "/" + filename) csrc = " \\\n\t".join(csrc) + " \\" pcsrc = " \\\n\t".join(pcsrc) + " \\" @@ -266,6 +269,11 @@ def loadModuleDefinition(first_comment): if "module_description" in moduleDefinition.keys(): moduleDict[moduleName]["description"] = moduleDefinition["module_description"] del moduleDefinition["module_description"] + if const.MODULE_DEFINITION["module_harvard"] in moduleDefinition.keys(): + harvard = moduleDefinition[const.MODULE_DEFINITION["module_harvard"]] + if harvard == "both" or harvard == "pgm_memory": + moduleDict[moduleName]["harvard"] = harvard + del moduleDefinition[const.MODULE_DEFINITION["module_harvard"]] moduleDict[moduleName]["constants"] = moduleDefinition moduleDict[moduleName]["enabled"] = False return toBeParsed, moduleDict diff --git a/wizard/const.py b/wizard/const.py index 2b894126..454a76e4 100644 --- a/wizard/const.py +++ b/wizard/const.py @@ -53,4 +53,5 @@ MODULE_DEFINITION = { "module_name": "module_name", "module_configuration": "module_configuration", "module_depends": "module_depends", + "module_harvard": "module_harvard", } \ No newline at end of file