Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎05-13-2016

Launching Batch commands from TCL

I have automated my build process.  I have a TCL command file that does most of what I need, including calling some perl scripts.

I also have some batch files that I use to check my various bit, srec, mcs, bin, etc,, files into our SVN system.


I would like to streamline things, and have my TCL script call my batch files, but have had no luck.


I am running tcl from within the Vivado TCL console window


I have tried things like

exe test.bat

exe cmd test.bat

exe cmd.exe test.bat

exe cmd.exe /c test.bat




Whenever I issue the exe cmd or exe cmd.exe, the tcl console locks up.

0 Kudos
7 Replies
Xilinx Employee
Xilinx Employee
Registered: ‎01-04-2013

Did you try exec? 


exec test.bat



0 Kudos
Registered: ‎05-13-2016

it was the first in my list


0 Kudos
Xilinx Employee
Xilinx Employee
Registered: ‎01-04-2013

'exec' vs. 'exe'

0 Kudos
Registered: ‎05-13-2016

Sorry.  Tried it. Doesn't work!

0 Kudos
Xilinx Employee
Xilinx Employee
Registered: ‎01-04-2013

Hi Paul,


Sorry you are having trouble with this. The exec command should pass through your bat file to the OS, but it has difficulty with interactive commands that need user input. In this case, the bat file itself seems to wait for input at the beginning of execution, thus hanging up the script. For instance, the following works fine:


exec test.bat


Where the contents of test.bat are:

echo "This should work."
date /T
time /T


However, if you remove the /T from either date or time, the bat file waits for input at the start, even though the input is not required until later in the script. I don't know what your are trying to do with your bat files or scripts, so I don't know if this is your issue. Sorry I can't be of more help.


Best regards,

0 Kudos
Registered: ‎05-13-2016

Here is my bat file - maybe its the pause,  I will try with the /T when I get back to it....


cd C:/CrewNet_Builds/RT/Programming_files

SET Build=0c000006

svn remove  http://ccsvn/X-System/XBinFiles/1000/D6/D6_RT_BL0_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/D6/D6_RT_BL0_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/D6/D6_RT_BL0_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1000/E6/E6_RT_BL1_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/E6/E6_RT_BL1_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/E6/E6_RT_BL1_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1000/D7/D7_RT_APP_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/D7/D7_RT_APP_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/D7/D7_RT_APP_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1000/E7/E7_RT_APP_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/E7/E7_RT_APP_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/E7/E7_RT_APP_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1000/D8/RT_FPGA_MANUFACTURING_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/D8/RT_FPGA_MANUFACTURING_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/D8/RT_FPGA_MANUFACTURING_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1000/E8/RT_FPGA_MANUFACTURING_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/E8/RT_FPGA_MANUFACTURING_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/E8/RT_FPGA_MANUFACTURING_%Build%.mcs -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1000/D9/D9_RT_Info_Packet_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/D9/D9_RT_Info_Packet_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/D9/D9_RT_Info_Packet_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1000/E9/E9_RT_Info_Packet_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1001/E9/E9_RT_Info_Packet_%Build%.bin -m "Removing file"
svn remove  http://ccsvn/X-System/XBinFiles/1002/E9/E9_RT_Info_Packet_%Build%.bin -m "Removing file"


svn import %cd%\D6_RT_BL0_%Build%.mcs http://ccsvn/X-System/XBinFiles/1000/D6/D6_RT_BL0_%Build%.mcs -m "Adding file"
svn import %cd%\D6_RT_BL0_%Build%.mcs http://ccsvn/X-System/XBinFiles/1001/D6/D6_RT_BL0_%Build%.mcs -m "Adding file"
svn import %cd%\D6_RT_BL0_%Build%.mcs http://ccsvn/X-System/XBinFiles/1002/D6/D6_RT_BL0_%Build%.mcs -m "Adding file"
svn import %cd%\E6_RT_BL1_%Build%.mcs http://ccsvn/X-System/XBinFiles/1000/E6/E6_RT_BL1_%Build%.mcs -m "Adding file"
svn import %cd%\E6_RT_BL1_%Build%.mcs http://ccsvn/X-System/XBinFiles/1001/E6/E6_RT_BL1_%Build%.mcs -m "Adding file"
svn import %cd%\E6_RT_BL1_%Build%.mcs http://ccsvn/X-System/XBinFiles/1002/E6/E6_RT_BL1_%Build%.mcs -m "Adding file"
svn import %cd%\D7_RT_APP_%Build%.bin http://ccsvn/X-System/XBinFiles/1000/D7/D7_RT_APP_%Build%.bin -m "Adding file"
svn import %cd%\D7_RT_APP_%Build%.bin http://ccsvn/X-System/XBinFiles/1001/D7/D7_RT_APP_%Build%.bin -m "Adding file"
svn import %cd%\D7_RT_APP_%Build%.bin http://ccsvn/X-System/XBinFiles/1002/D7/D7_RT_APP_%Build%.bin -m "Adding file"
svn import %cd%\E7_RT_APP_%Build%.bin http://ccsvn/X-System/XBinFiles/1000/E7/E7_RT_APP_%Build%.bin -m "Adding file"
svn import %cd%\E7_RT_APP_%Build%.bin http://ccsvn/X-System/XBinFiles/1001/E7/E7_RT_APP_%Build%.bin -m "Adding file"
svn import %cd%\E7_RT_APP_%Build%.bin http://ccsvn/X-System/XBinFiles/1002/E7/E7_RT_APP_%Build%.bin -m "Adding file"
svn import %cd%\D8_RT_BL0_APP_%Build%.mcs http://ccsvn/X-System/XBinFiles/1000/D8/D8_RT_BL0_APP_%Build%.mcs -m "Adding file"
svn import %cd%\D8_RT_BL0_APP_%Build%.mcs http://ccsvn/X-System/XBinFiles/1001/D8/D8_RT_BL0_APP_%Build%.mcs -m "Adding file"
svn import %cd%\D8_RT_BL0_APP_%Build%.mcs http://ccsvn/X-System/XBinFiles/1002/D8/D8_RT_BL0_APP_%Build%.mcs -m "Adding file"
svn import %cd%\E8_RT_BL1_APP_%Build%.mcs http://ccsvn/X-System/XBinFiles/1000/E8/E8_RT_BL1_APP_%Build%.mcs -m "Adding file"
svn import %cd%\E8_RT_BL1_APP_%Build%.mcs http://ccsvn/X-System/XBinFiles/1001/E8/E8_RT_BL1_APP_%Build%.mcs -m "Adding file"
svn import %cd%\E8_RT_BL1_APP_%Build%.mcs http://ccsvn/X-System/XBinFiles/1002/E8/E8_RT_BL1_APP_%Build%.mcs -m "Adding file"
svn import %cd%\D9_RT_Info_packet_%Build%.bin http://ccsvn/X-System/XBinFiles/1000/D9/D9_RT_Info_Packet_%Build%.bin -m "Adding file"
svn import %cd%\D9_RT_Info_packet_%Build%.bin http://ccsvn/X-System/XBinFiles/1001/D9/D9_RT_Info_Packet_%Build%.bin -m "Adding file"
svn import %cd%\D9_RT_Info_packet_%Build%.bin http://ccsvn/X-System/XBinFiles/1002/D9/D9_RT_Info_Packet_%Build%.bin -m "Adding file"
svn import %cd%\E9_RT_Info_packet_%Build%.bin http://ccsvn/X-System/XBinFiles/1000/E9/E9_RT_Info_Packet_%Build%.bin -m "Adding file"
svn import %cd%\E9_RT_Info_packet_%Build%.bin http://ccsvn/X-System/XBinFiles/1001/E9/E9_RT_Info_Packet_%Build%.bin -m "Adding file"
svn import %cd%\E9_RT_Info_packet_%Build%.bin http://ccsvn/X-System/XBinFiles/1002/E9/E9_RT_Info_Packet_%Build%.bin -m "Adding file"


0 Kudos
Registered: ‎05-13-2016

Sorry, didn't work.



I tried a simple test.bat command whose contents are simply pause


pause /T


Vivado hangs, and a command window does not open and pause.



I have pause statements in my batch files so that I can view the output from my other commands.


I suppose I can try piping the output to files.....if I can remember how...



0 Kudos