AR# 52219


Project Navigator - Can I pass an environment variable through a prj script to XST?


I would like to send an environment variable to XST through my .prj file. Is this possible?

Example: I have an environment variable pointing to my source directory such as MY_DIR=C:\HDL_files.
verilog work %MY_DIR%\project\simple.v
However, when I run XST, I get an error: HDLCompiler 439: could not find %MY_DIR%\project\simple.v


No, this is not a supported use case. The .prj file is not a batch (.bat) Windows script or a shell script. The file is OS independent, and thus does not support Windows format environment variables.

Although it is not supported, Linux environment variables have been seen to pass successfully through this method.

A possible alternative would be to use relative paths in the .prj file.
AR# 52219
Date 10/03/2012
Status Active
Type General Article
People Also Viewed