dinesh
dinesh

Reputation: 805

Win executable runs but calling command stalls on Cygwin command line

I'm rebuilding a flash loader utility for a TI chip and am facing a minor issue that's affecting my workflow. I'm using a 64-bit Win7 PC and rebuilding the utility using make on cygwin bash shell. make and cygwin version numbers below.

$ make -v
GNU Make 3.82.90
Built for i686-pc-cygwin
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ uname -a
CYGWIN_NT-6.1-WOW64 DEEDAA 1.7.15(0.260/5/3) 2012-05-09 10:25 i686 Cygwin

One step in the build process calls a previously generated utility (windows executable) to generate the bin file that is required for the TI processor.

../../AISUtils//HexAIS_OMAP-L138.exe -ini ../sft_hexais.ini -o ../sft_C6748_SPI_MEM.bin ../sft_C6748_SPI_MEM.out

After this command is called there is no progress seen on the cygwin command line. However, execution of the command does complete, generating the files specified in this step and proceeds with the steps that follow in the makefile. It's just that I can never regain control of this window. I always need to kill the window, start another instance of cygwin.

If I try to kill the cygwin window immediately I get the message below.

mintty
Processes are running in session
Close anyway?

If I wait a while (the time to complete the steps that follow), then I can kill the window without this message popping up.

The same command on the windows command line is executed without any stalls and I do regain my command line.

    c:\ti\boot_tools\OMAP-L138_FlashAndBootUtils_2_40\OMAP-L138\GNU\AISUtils>HexAIS_OMAP-L138.exe -ini ..\sft\sft_hexais.ini
     -o ..\sft\sft_C6748_SPI_MEM.bin ..\sft\sft_C6748_SPI_MEM.out
    -----------------------------------------------------
       TI AIS Hex File Generator for OMAP-L138
       (C) 2012, Texas Instruments, Inc.
       Ver. 1.27
    -----------------------------------------------------

Begining the AIS file generation.
AIS file being generated for bootmode: UART.
Parsing the input object file, ..\sft\sft_C6748_SPI_MEM.out.
AIS file generation was successful.
Wrote 15464 bytes to file ..\sft\sft_C6748_SPI_MEM.bin.
Conversion is complete.

It seems to me that something about the way the command is constructed is pushing commands on to another shell or forcing it to run in the background. Any thoughts on what may be going on or steps I can try to debug the issue?

file format of the executable that stalls

$ file AISUtils/HexAIS_OMAP-L138.exe
AISUtils/HexAIS_OMAP-L138.exe: PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows

Link to TI wiki that explains the build process. The link provides general instructions on rebuilding the utility and is very unlikely to provide any specific information related to my question. I'm only including it in case someone needed more background about the tools or the process.

http://processors.wiki.ti.com/index.php/Rebuilding_the_Flash_and_Boot_Utils_Package

Thanks.

Upvotes: 0

Views: 1008

Answers (1)

ephemient
ephemient

Reputation: 204718

Running Windows console applications inside a Cygwin (MinTTY) terminal is usually a terrible idea.

Try running inside a Windows (cmd) console or using cygstart to launch in a new window (in a Makefile, -w would probably be useful too).

Upvotes: 1

Related Questions