soc/integration: allow using builder with soc.cpu_type == None
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 26 Nov 2015 16:27:55 +0000 (17:27 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 26 Nov 2015 16:44:50 +0000 (17:44 +0100)
litex/soc/integration/builder.py

index 45439ef093befacd455da390d48594eb39b8fe39..b209e7065fc18bf7e25796415bc174a3b79a6256 100644 (file)
@@ -133,14 +133,18 @@ class Builder:
     def build(self):
         self.soc.finalize()
 
-        if self.soc.integrated_rom_size and not self.compile_software:
-            raise ValueError("Software must be compiled in order to "
-                             "intitialize integrated ROM")
-
-        self._prepare_software()
-        self._generate_includes()
-        self._generate_software()
-        self._initialize_rom()
+        os.makedirs(self.output_dir, exist_ok=True)
+
+        if self.soc.cpu_type is not None:
+            if self.soc.integrated_rom_size and not self.compile_software:
+                raise ValueError("Software must be compiled in order to "
+                                 "intitialize integrated ROM")
+
+            self._prepare_software()
+            self._generate_includes()
+            self._generate_software()
+            self._initialize_rom()
+
         if self.gateware_toolchain_path is None:
             kwargs = dict()
         else: