21.3.1 add_file_to_library
(Ask a Question)Description
This Tcl command adds a file to a library in your project.
add_file_to_library -library "library name" [-file "filename"]
Arguments
Parameter | Type | Description |
---|---|---|
library | string | Name of the library where you wish to add your file. |
file | string | Specifies the new name of the file you wish to add (must be a full pathname). This parameter is optional |
Error Codes
Error Code | Description |
---|---|
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"]+ '. |
None | File 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"