"""
self.pageContent.cpuList.clear()
self.pageContent.cpuList.setCurrentItem(None)
- infos = bertos_utils.loadCpuInfos(self.project())
+ infos = self.project().loadCpuInfos()
tag_list = bertos_utils.getTagSet(infos)
# Create, fill and store the dict with the tags
tag_dict = {}
import pickle
import DefineException
+import const
from bertos_utils import (
# Utility functions
- isBertosDir, loadCpuInfos, getTagSet, setEnabledModules,
+ isBertosDir, getTagSet, setEnabledModules, getInfos,
loadConfigurationInfos, loadDefineLists, loadModuleDefinition,
getCommentList, updateConfigurationValues,
self.loadSourceTree()
cpu_name = project_data["CPU_NAME"]
self.infos["CPU_NAME"] = cpu_name
- cpu_info = loadCpuInfos(self)
+ cpu_info = self.loadCpuInfos()
for cpu in cpu_info:
if cpu["CPU_NAME"] == cpu_name:
self.infos["CPU_INFOS"] = cpu
self.infos["CONFIGURATIONS"] = configuration_info_dict
self.infos["FILES"] = file_dict
+ def loadCpuInfos(self):
+ cpuInfos = []
+ for definition in self.findDefinitions(const.CPU_DEFINITION):
+ cpuInfos.append(getInfos(definition))
+ return cpuInfos
+
+ def reloadCpuInfo(self):
+ for cpu_info in self.loadCpuInfos():
+ if cpu_info["CPU_NAME"]:
+ self.infos["CPU_INFOS"] = cpu_info
def setInfo(self, key, value):
"""
name = "GCC " + toolchain_info["version"] + " - " + toolchain_info["target"].strip()
return name
-def loadCpuInfos(project_info):
- cpuInfos = []
- for definition in project_info.findDefinitions(const.CPU_DEFINITION):
- cpuInfos.append(getInfos(definition))
- return cpuInfos
-
def getTagSet(cpu_info):
tag_set = set([])
for cpu in cpu_info: