I have a constraints (XDC) file that is added to the project, but not copied into the project and this constraints file is made the target. I write out a Tcl file (e.g., recreate_my_project.tcl) with the write_project_tcl command (e.g. "write_project_tcl -force -all_properties ./recreate__my_project.tcl"). Then, when I source the Tcl file I get the following error:
ERROR: [Common 17-69] Command failed: Invalid constraints filename specified
Why does this occur and how can I work around the issue?
This issue occurs because the "write_project_tcl" command incorrectly creates the path to the target XDC file not in the Vivado project.
set_property "target_constrs_file" "$proj_dir/C://testdir/constraints.xdc" $obj
You can see the path definition is not correct as it places the $proj_dir variable followed by the complete path location of the file.
To work around the issue, it is necessary to manually modify the path in the command above to remove the $proj_dir variable which prepends the correct path.
Example of modified command:
set_property "target_constrs_file" "C:/testdir/constraints.xdc" $obj
This issue has been fixed in Vivado Design Suite 2013.2.