This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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





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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]