December 17, 2024

Vivado and Tcl - first steps

Long ago I used to use Tcl for general programming. Note that you do not need to install Tcl to use tcl with vivado. Tcl is built into vivado and customized for the specific uses that vivado wants to make of it.

But I was curious about using Tcl on my Fedora system outside of Vivado. It is already installed, but typing "tcl" does nothing. This is an old "trick" and stupid decision by somebody. You need to type "tclsh" to get what you want. The same goes for scripts, for general (non-vivado) tcl scripts you use this as the first line:

#!/bin/tclsh
With this nonsense out of the way, we are on to the next thing. I have been running "vivado" via a tiny shell script that looks like this:
#!/bin/bash

cd /home/tom/vivado
/tools/Xilinx/Vivado/2024.2/bin/vivado
Now I am wanting to launch vivado with various command line options. I could modify this script to relay those, or I could just make /home/tom/bin/vivado a symbolic link. I choose to go with the link.
ln -s /tools/Xilinx/Vivado/2024.2/bin/vivado
It turns out this does not work at all. Vivado apparently inspects the path by which it is started (which will be "." in this case and will expect to find other things there, such as:
/home/tom/bin/vivado: line 25: /home/tom/bin/setupEnv.sh: No such file or directory
/home/tom/bin/vivado: line 48: /loader: No such file or directory
The best approach would be to add the bin directory to my path. I can do this by editing my .bashrc and adding this line.
export PATH=/opt/esp-open-sdk/xtensa-lx106-elf/bin:$PATH

Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]