21.3.1 add_file_to_library

Description

This Tcl command adds a file to a library in your project.

add_file_to_library -library "library name" [-file "filename"]

Arguments

ParameterTypeDescription
librarystringName of the library where you wish to add your file.
filestringSpecifies the new name of the file you wish to add (must be a full pathname).

This parameter is optional

Error Codes

Error CodeDescription
None

Parameter 'file' is missing or has invalid value.

None

Parameter 'param_name' is not defined. Valid command formatting is 'add_file_to_library -library "library name" [-file "file"]+ '.

NoneFile is not in the project

Supported Families

Supported Families
PolarFire®
RTG4
SmartFusion® 2
IGLOO® 2

Example

Add a file named foo.vhd from the ./project/hdl directory to the library my_lib.

add_file_to_library -library "my_lib" -file "./project/hdl/foo.vhd"

See Also