[U-Boot] FW: which protocol do I use to send S-record files when using the loads command ?

Wolfgang Denk wd at denx.de
Thu Aug 19 22:06:38 CEST 2010


Dear Jef Mangelschots,

In message <AANLkTi=7zuPGN3ES_zqe6Qrwc+akB4S=JnkLNvsssj_T at mail.gmail.com> you wrote:
>
> 4) I can not get this to work on our system (our U-boot is configured
> for 115200 baud). The following explanation is based on my
> observation. I might be wrong and please correct me if I am:
> U-boot can not keep up with the incoming text stream while parsing the
> S-records, i.e. I saw that it processed the first S0-record correctly,
> but when parsing the next record, it breaks off because the following

It is not exactly _parsing_ the record, but storing the decoded data
to it's final destination, which usually includes flash programming
cycles.

> record contains junk. As far as I can see, this seems to be because
> the Terminal program keeps sending data when U-boot is busy parsing a
> received S-record. Even after the S-record parser breaks off, the

Right. We recommend "cu" and setting the CONFIG_LOADS_ECHO option in
your board config file, because "cu" appears to implemnt a simple kind
of handshake in the form that after sending a line to the target it
waits until it receives a line (the echo) back. Without that, you need
to insert inter-line delays.

> in delays after each character. Unfortunately, Teraterm and many other
> terminal programs do not allow delays of less than 1 msec. It works
> for me with a 1 msec delay after each character but at a grueling slow
> pace. A file of 3 Mbytes takes hours.

Apply better tools. Use for example "expect", which allows fine-graded
inter-charatcer and inter-line timings ( see the "send-slow" command).
"expect" is also available for Windows, I understand.

> 6) maybe I can get this to work by making the RX buffer much bigger,
> but haven't tried it yet.

This will not help. U-Boot uses polling drivers. When it is
programming the flash, it is simply nt listening on the serial port -
no matter how big the buffers are.

> 8) People that use Kermit under Linux seem to have no problem, but I
> do not know in what sense their systems differ from mine.

Kermit binary protocol is not only much more eficient than S-Records,
but also much more robust nd reliable.

> 10) The system I work on is a bareboard embedded system using U-boot
> to start up. That is why we are trying to use S-record files for
> uploading new programs, and not the more efficient FTP used in Linux.

So you do have a network interface on your board?  Heck, why don;t you
use TFTP then???

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Peace was the way.
	-- Kirk, "The City on the Edge of Forever", stardate unknown


More information about the U-Boot mailing list