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

Jef Mangelschots jef.mangelschots at gmail.com
Thu Aug 19 19:33:28 CEST 2010


Ok, here is a summary of what I have found out so, with the help of
Wolfgang. Many thanks.

1) Wolfgang refers to the manual for system setup:
http://www.denx.de/wiki/view/DULG/SystemSetup
He recommends Linux programs cu and Kermit.

2) When using the "loads" command to upload an S-record file, only use
the upload text feature of your terminal emulator. Do not use any of
the protocols (like Kermit, YMODEM, ...). In the Windows program
Teraterm, this corresponds to menu: File | Send file ... In
Hyperterminal, this would be Transfer | Send text File ...

3) Also, U-boot does NOT use Hardware protocol or XON/OFF. So protocol
is set to None.

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
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
terminal program keeps sending the file content, which U-boot
interprets a unknown commands. The junk record is basically what is
left in the buffer by the time U-boot gets around to parsing the next
record.

5) I was able to make this work by slowing down the file upload. In
some terminal programs (like TeraTerm, menu Setup | Serial port ...)
you can specify a delay after every character and a delay after every
line. The above theory suggest (and was also suggested by Wolfgang) to
put in a delay after every line to allow U-boot to process. However
that did not work for me, even with putting in delays of 500 to 600 ms
after each line. I might make it work with putting in higher values
but that would be ridiculous. I was able to make it work with putting
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.

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

7) Our board is based on the PowerPC-based ADS5121running at 400MHz.
U-boot is configured at 115200 baud

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.

9) Please do not suggest I switch to Linux. it is not an option.
Personally I would like to, but we can not enforce this upon our
clients.

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.


More information about the U-Boot mailing list