We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

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 Created 10/03/2012
Last Updated 10/03/2012
Status Active
Type General Article
  • ISE