Add the findToolchains function that allow to find the files that match the toolchain...
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Dec 2008 16:00:41 +0000 (16:00 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 22 Dec 2008 16:00:41 +0000 (16:00 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2116 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py
wizard/const.py

index 99bdca23f7b248463f1dcd42452795736b4f1871..0e1d4bbb76a74e9388651637bdb0365ccaafecf4 100644 (file)
@@ -11,6 +11,7 @@
 
 import os
 import fnmatch
+import glob
 
 import const
 
@@ -25,6 +26,12 @@ def createBertosProject(directory):
         os.mkdir(directory)
     open(directory + "/project.bertos", "w")
 
+def findToolchains(pathList):
+    toolchains = []
+    for element in pathList:
+        toolchains += glob.glob(element+ "/" + const.GCC_NAME)
+    return toolchains
+
 def findDefinitions(ftype, path):
     L = os.walk(path)
     for element in L:
index 7b30cb8ee47049f05adbee3b96cff14d3f52ae02..e0106b3800e881574b613fd1c8adb36f4d9c7b97 100644 (file)
@@ -24,4 +24,6 @@ CPU_DEF = {
     "CPU_DESC" : []
 }
 
-CPU_DEFINITION = "*.cdef"
\ No newline at end of file
+CPU_DEFINITION = "*.cdef"
+
+GCC_NAME = "*gcc*"
\ No newline at end of file