build/microsemi/libero_soc: add linux build script support

This commit is contained in:
Florent Kermarrec 2019-03-16 09:33:16 +01:00
parent 7b88980d06
commit 7bc13ba841
1 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,8 @@ def _format_io_constraint(c):
elif isinstance(c, IOStandard): elif isinstance(c, IOStandard):
return "-io_std {} ".format(c.name) return "-io_std {} ".format(c.name)
elif isinstance(c, Misc): elif isinstance(c, Misc):
return "-RES_PULL {} ".format(c.misc)
else:
raise NotImplementedError raise NotImplementedError
@ -183,7 +185,10 @@ def _build_script(build_name, device, toolchain_path, ver=None):
copy_stmt = "copy" copy_stmt = "copy"
fail_stmt = " || exit /b" fail_stmt = " || exit /b"
else: 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 build_script_file = "build_" + build_name + script_ext
tools.write_to_file(build_script_file, build_script_contents, tools.write_to_file(build_script_file, build_script_contents,