build/microsemi/libero_soc: add linux build script support
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 16 Mar 2019 08:33:16 +0000 (09:33 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 16 Mar 2019 08:33:16 +0000 (09:33 +0100)
litex/build/microsemi/libero_soc.py

index 4327f62393c28e5797654aa0b2b3d8f5e5f0e86c..a82ac5862615962617138b69bbe6e3af7931c237 100644 (file)
@@ -23,6 +23,8 @@ def _format_io_constraint(c):
     elif isinstance(c, IOStandard):
         return "-io_std {} ".format(c.name)
     elif isinstance(c, Misc):
+        return "-RES_PULL {} ".format(c.misc)
+    else:
         raise NotImplementedError
 
 
@@ -183,7 +185,10 @@ def _build_script(build_name, device, toolchain_path, ver=None):
         copy_stmt = "copy"
         fail_stmt = " || exit /b"
     else:
-        raise NotImplementedError
+        script_ext = ".sh"
+        build_script_contents = "# Autogenerated by Migen\n\n"
+        copy_stmt = "cp"
+        fail_stmt = " || exit 1"
 
     build_script_file = "build_" + build_name + script_ext
     tools.write_to_file(build_script_file, build_script_contents,