FW: Re: Why is my executabel in DOS file format?

Meg Abyte fitter20@hotmail.com
Tue Mar 9 09:17:00 GMT 2004




>On your unixish box (GNU/Linux in this case) issue that command as root:
># stty -F /dev/tts/0 -onlcr  (/dev/tts/0 is another name for /dev/ttyS0)
>
>The onlcr setting, if enabled (you're disabling it here), tells the
>kernel to translate \012 into \015\012, or \n into \r\n (except that the
>meaning of '\n' is a little more ambiguous across host types).  So if
>your srec files already contain \015\012 as emitted by the bfd routines,
>they will go out as \015\015\012 on the serial port, on which your board
>will barf.
>
>Disable -onlcr and hey presto, maybe problem solved.  Let us know how it
>works out!


No. That doesn't work.

It was disabled. However, I did try playing with it still, and that didn't 
do anything.

Still looks like only solution is to change the SREC as I described or use 
the fix given here for the srec creationg.

It just bugs me WHY this is occuring  though.
I mean. It doesn't appear to be Linux then. Unless it is some other thing 
than stty. Only way to confirm linux forsure would be to get a protocol 
analyser that read the serial port to confirm if it is doing a CR/CR/LF when 
I cat it out.
And it doesn't appear to be the hardware. The same hardware will accept an 
s19 with CR/LF OR /LF from WINDOWS, (on the same PC even - dual boot).
Linux will only work if the s19 is changed to have /LF.

The only thing that makes sense is that somehow LF is being changed to CR by 
linux somehow??

_________________________________________________________________
Add photos to your e-mail with MSN Premium. Get 2 months FREE*  
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines



More information about the Binutils mailing list