X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=91ab05ad0d99363d987de81d7b38b882bc0e98b8;hb=0e3af97aae82cb7ca21366ff2c6cbb2794ae956a;hp=5d3edd6900b8ea1aabdf1b34fae233649bb1568d;hpb=9d095960f0b45a04bb86878834bdfbb032aa41eb;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 5d3edd69..91ab05ad 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -53,13 +53,21 @@ def createBertosProject(project_info): cfgdir = prjdir + "/cfg" shutil.rmtree(cfgdir, True) os.mkdir(cfgdir) + # Set to 1 the autoenabled for enabled modules + for module, information in project_info.info("MODULES").items(): + if information["enabled"] and "configuration" in information and information["configuration"] != "": + configurations = project_info.info("CONFIGURATIONS") + configuration = configurations[information["configuration"]] + for start, parameter in configuration["paramlist"]: + if "type" in configuration[parameter] and configuration[parameter]["type"] == "autoenabled": + configuration[parameter]["value"] = "1" + project_info.setInfo("CONFIGURATIONS", configurations) + # Copy all the configuration files for configuration, information in project_info.info("CONFIGURATIONS").items(): string = open(sources_dir + "/" + configuration, "r").read() for start, parameter in information["paramlist"]: infos = information[parameter] value = infos["value"] - if "type" in infos["informations"] and infos["informations"]["type"] == "autoenabled": - value = "1" if "unsigned" in infos["informations"].keys() and infos["informations"]["unsigned"]: value += "U" if "long" in infos["informations"].keys() and infos["informations"]["long"]: @@ -87,6 +95,7 @@ def mkGenerator(project_info, makefile): mk_data["$pname"] = os.path.basename(project_info.info("PROJECT_PATH")) mk_data["$cpuflag"] = project_info.info("CPU_INFOS")["CPU_FLAG_NAME"] mk_data["$cpuname"] = project_info.info("CPU_INFOS")["CORE_CPU"] + mk_data["$cpuclockfreq"] = project_info.info("SELECTED_FREQ") mk_data["$cflags"] = " ".join(project_info.info("CPU_INFOS")["C_FLAGS"]) mk_data["$ldflags"] = " ".join(project_info.info("CPU_INFOS")["LD_FLAGS"]) mk_data["$cppflags"] = " ".join(project_info.info("CPU_INFOS")["CPP_FLAGS"])