cpu_info = self.projectInfo("CPU_INFOS")
if cpu_info:
target = cpu_info["TOOLCHAIN"]
+ # Try to find a suitable toolchain automatically
+ tm = ToolchainManager()
+ suitable_toolchains = tm.suitableToolchains(target)
+ if len(suitable_toolchains) == 1:
+ return self.wizard().pageIndex(BOutputPage)
+ else:
+ return self.wizard().pageIndex(BToolchainPage)
else:
# It seems that the nextId method is called before the
# reloadData one (that is called after the page changing.
#
# TODO: fix this awful code lines
target = None
- # Try to find a suitable toolchain automatically
- tm = ToolchainManager()
- suitable_toolchains = tm.suitableToolchains(target)
- if len(suitable_toolchains) == 1:
- return self.wizard().pageIndex(BOutputPage)
- else:
return self.wizard().pageIndex(BToolchainPage)
####
toolchains = self.toolchains
suitable_toolchains = []
for name, info in toolchains:
- if info and info.get('target', None) == target:
+ t = info.get("target", None)
+ if t and t.find(target) != -1:
suitable_toolchains.append(name)
return suitable_toolchains