build/vivado: quote paths in Tcl (prevents problems with \ on Windows)

This commit is contained in:
Sebastien Bourdeauducq 2015-10-19 09:40:44 +08:00
parent 4acb7bc662
commit ec80f0fa7e
1 changed files with 4 additions and 2 deletions

View File

@ -80,8 +80,10 @@ class XilinxVivadoToolchain:
def _build_batch(self, platform, sources, build_name): def _build_batch(self, platform, sources, build_name):
tcl = [] tcl = []
for filename, language, library in sources: for filename, language, library in sources:
tcl.append("add_files " + filename) filename_tcl = "{" + filename + "}"
tcl.append("set_property library {} [get_files {}]".format(library, filename)) tcl.append("add_files " + filename_tcl)
tcl.append("set_property library {} [get_files {}]"
.format(library, filename_tcl))
tcl.append("read_xdc {}.xdc".format(build_name)) tcl.append("read_xdc {}.xdc".format(build_name))
tcl.extend(c.format(build_name=build_name) for c in self.pre_synthesis_commands) tcl.extend(c.format(build_name=build_name) for c in self.pre_synthesis_commands)