If I add source files to a Vivado project with the Add Sources process, I have the option to check Copy sources into project. This copies my source files to a directory under the Vivado project directory. At this point, any change to the source files in the original location will have no affect on the Vivado project.
Is there a command to update all of the source files copied into Vivado project with newer files from my original source location?
In the Vivado integrated design environment (IDE), a user can right-click on a single source file and select "Replace File"; this replaces the local project copy of this file with the new file from the original location.
This method must be performed for each file that needs to be updated.
In the Tcl console or in a Tcl script, the reimport_files command can be used to re-import all of the source files when they are found to be out-of-date
reimport_files [-force] [-quiet] [-verbose] [<files>...]
list of file objects that were imported
[-force] Force a reimport to happen even when the local files may be
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
[<files>] List of files to reimport. If no files are specified, all files in the project that are out-of-date, will be reimported
Reimports project files. This updates the local project files from the original referenced source files.
NOTE: Using reimport_files has the potential of overwriting user changes that are local to the project. The "Replace File" process walks the user through an explicit step of confirmation to verify they really want to overwrite a file.