コード例 #1
0
ファイル: propeller_binary.py プロジェクト: robionica/b3
 def process_raw_parameters(self, raw_parameters):
   CCBinary.process_raw_parameters(self, raw_parameters)
   self._set_memtype(raw_parameters.pop("memtype"))
   use_simpleide = raw_parameters.pop("simpleide")
   # TODO(d2rk): check parallax config section.
   simpleide_home = os.environ.get("PARALLAX_SIMPLEIDE_HOME", None)
   if use_simpleide:
     if not simpleide_home:
       raise Exception("PARALLAX_SIMPLEIDE_HOME is not defined.")
     self._simpleide_home = simpleide_home
     simple_libraries = os.path.join(simpleide_home, "parallax", "Workspace",
                                     "Learn", "Simple Libraries")
     for category in os.listdir(simple_libraries):
       for name in os.listdir(os.path.join(simple_libraries, category)):
         path = os.path.join(simple_libraries, category, name)
         if os.path.isdir(path):
           self._include_paths.append(path)
           library_path = os.path.join(path, self._memtype)
           self._library_paths.append(library_path)
           for library_path in glob.glob(os.path.join(library_path, "lib*.a")):
             name, ext = os.path.splitext(os.path.basename(library_path))
             self._library_names.append(name[len("lib"):])
     self._copts.append("-m32bit-doubles")
コード例 #2
0
ファイル: propeller_binary.py プロジェクト: robionica/b3
 def __init__(self, *args, **kwargs):
   CCBinary.__init__(self, *args, **kwargs)
   self._compiler = PropGCC()
   self._simpleide_home = None