All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Loadb issue
@ 2006-07-19 10:41 Banajit Goswami
  2006-07-19 10:54 ` Andreas Schweigstill
  2006-07-19 10:54 ` Kaushik karandikar
  0 siblings, 2 replies; 8+ messages in thread
From: Banajit Goswami @ 2006-07-19 10:41 UTC (permalink / raw)
  To: u-boot

Hi All,
 I am a new member to this mailing list.

 I am porting u-boot to a arm926ej board. I have a serial port which I am
trying to use to download a binary image. But I am not able to do so. I am
trying to use loadb and loads and both seems to be failing.

Here is a typical sequence i followed
  1) Boot-up the board
  2) Connected to Hyperterminal (tried minicom, cu, kermit and dnw) with 8N1
and hw-flw control as "none".
  3) at u-boot command prompt gave following command
         => loadb 0x60008000 115200
  4) From hyperterminal, Transfer->send file with protocol as kermit,
selected the file and tried sending, but failed. Everytime  hyperterminal
poped up "error limit exceeded".

# loadb
## Ready for binary (kermit) download to 0x60008000 at 115200 bps..

 When tried looking the point where it is geting stuck, I saw u-boot waiting
in the while loop looking for the 'START_CHAR' in the following section of
code:

k_recv(){
.....
....
  for (;;) {
      switch (getc ()) {
        case START_CHAR: /* start packet */
             goto START;
        case ETX_CHAR:  /* ^C waiting for packet */
             return (0);
       default:
             ;
      }
  }
....
...
}

 I am not sure how to use 'loadb' and 'loads'. Read a few docs about uses
though, none explained what needs to be done in implementation part.

 Can anyone give me some pointer, as in, any board which has implemeted and
using any of the commands? What might have gone wrong here??

Or any other commands I can use for serial download of binary image?

Thanks in advance
Banajit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060719/424aab63/attachment.htm 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] Loadb issue
  2006-07-19 10:41 [U-Boot-Users] Loadb issue Banajit Goswami
@ 2006-07-19 10:54 ` Andreas Schweigstill
  2006-07-19 10:54 ` Kaushik karandikar
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Schweigstill @ 2006-07-19 10:54 UTC (permalink / raw)
  To: u-boot

Dear Banajit!

Banajit Goswami schrieb:
 > Content-Type: text/html; charset=ISO-8859-1
 > Content-Transfer-Encoding: 7bit
 > Content-Disposition: inline

Please do not post messages in HTML format to this list.

>   3) at u-boot command prompt gave following command
>          => loadb 0x60008000 115200
>   4) From hyperterminal, Transfer->send file with protocol as kermit, 
> selected the file and tried sending, but failed. Everytime  
> hyperterminal poped up "error limit exceeded".

Are you sure that you are using the same baudrate for terminal mode
and kermit mode? Do the RS232 level converters have their own supply
or do they get it from the modem control lines? Although you selected
no handshake this doesn't neccessarily mean that the control lines
don't get toggled.

With best regards
Andreas Schweigstill

-- 
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] Loadb issue
  2006-07-19 10:41 [U-Boot-Users] Loadb issue Banajit Goswami
  2006-07-19 10:54 ` Andreas Schweigstill
@ 2006-07-19 10:54 ` Kaushik karandikar
  1 sibling, 0 replies; 8+ messages in thread
From: Kaushik karandikar @ 2006-07-19 10:54 UTC (permalink / raw)
  To: u-boot

Hi Banjit,
                How much memory (RAM)  you have?  Also check the PINSEL and BCFG configurations along  with the baud rate setting in u-boot code.
                 Those commands are working fine for my hardware which is arm7TDMI board.
  
  Thanks and Regards,
  Kaushik            

Banajit Goswami <banajit.goswami@gmail.com> wrote:  Hi All,
   I am a new member to this mailing list.
   
   I am porting u-boot to a arm926ej board. I have a serial  port which I am trying to use to download a binary image. But I am not  able to do so. I am trying to use loadb and loads and both seems to be  failing.
   
  Here is a typical sequence i followed
    1) Boot-up the board
    2) Connected to Hyperterminal (tried minicom, cu, kermit and dnw) with 8N1 and hw-flw control as "none".
    3) at u-boot command prompt gave following command
           => loadb 0x60008000 115200
    4) From hyperterminal, Transfer->send file with  protocol as kermit, selected the file and tried sending, but failed.  Everytime  hyperterminal poped up "error limit exceeded".
   
  # loadb
## Ready for binary (kermit) download to 0x60008000 at 115200 bps..
   
   When tried looking the point where it is geting stuck, I saw  u-boot waiting in the while loop looking for the 'START_CHAR' in the  following section of code:
   
  k_recv(){
  .....
  ....
    for (;;) {
      switch (getc ()) {
        case START_CHAR: /* start packet */
             goto START;
        case ETX_CHAR:  /* ^C waiting for packet */
             return (0);
       default:  
             ;
      }
  }
....
  ...
  }
   
   I am not sure how to use 'loadb' and 'loads'. Read  a few docs about uses though, none explained what needs to  be done in implementation part.
   
   Can anyone give me some pointer, as in, any board which has  implemeted and using any of the commands? What might have gone  wrong here??
   
  Or any other commands I can use for serial download of binary image?
   
  Thanks in advance
  Banajit
   
  -------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


 				
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060719/b474290a/attachment.htm 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] Loadb issue
@ 2006-07-19 13:19 Banajit Goswami
  2006-07-19 13:40 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Banajit Goswami @ 2006-07-19 13:19 UTC (permalink / raw)
  To: u-boot

Hi Andreas/All,

 Thanks for the reply.

 I am using same baudrate for terminal as well as kermit modes. both are
with 115200.

 I am getting the prompt on console over serial and able to execute commands
like help, bdinfo, md and mw etc.

 I am sending a log herewith with some of the commands' execution as well as
the .kermrc file that I am using.

Any pointer would be of very much help.

Thanks and Regards
Banajit

Message: 7
Date: Wed, 19 Jul 2006 12:54:46 +0200
From: Andreas Schweigstill <andreas@schweigstill.de>
Subject: Re: [U-Boot-Users] Loadb issue
To: u-boot-users at lists.sourceforge.net
Message-ID: < 44BE0F76.50208@schweigstill.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dear Banajit!

Banajit Goswami schrieb:
 > Content-Type: text/html; charset=ISO-8859-1
 > Content-Transfer-Encoding: 7bit
 > Content-Disposition: inline

Please do not post messages in HTML format to this list.

>   3) at u-boot command prompt gave following command
>          => loadb 0x60008000 115200
>   4) From hyperterminal, Transfer->send file with protocol as kermit,
> selected the file and tried sending, but failed. Everytime
> hyperterminal poped up "error limit exceeded".

Are you sure that you are using the same baudrate for terminal mode
and kermit mode? Do the RS232 level converters have their own supply
or do they get it from the modem control lines? Although you selected
no handshake this doesn't neccessarily mean that the control lines
don't get toggled.

With best regards
Andreas Schweigstill

--
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060719/5fceb672/attachment.htm 
-------------- next part --------------
                                                                                                 
U-Boot 1.0.0 (Jul 19 2006 - 17:33:49)
                                                                                                 
U-Boot code: 61000000 -> 610176C0  BSS: -> 6101B05C
IRQ Stack: 6103c058
FIQ Stack: 6103d058
DRAM Configuration:
Bank #0: 60000000 64 MB
Flash:  2 MB
*** Warning - bad CRC, using default environment
                                                                                                 
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
PEGASUS #
PEGASUS # help
?       - alias for 'help'
autoscr - run script from memory
base    - print or set address offset
bdinfo  - print Board Info structure
boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
cmp     - memory compare
coninfo - print console devices and informations
cp      - memory copy
crc32   - checksum calculation
dcache  - enable or disable data cache
echo    - echo args to console
erase   - erase FLASH memory
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
icache  - enable or disable instruction cache
iminfo  - print header information for application image
imls    - list all images found in flash
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sleep   - delay execution for some time
tftpboot- boot image via network using TFTP protocol
version - print monitor version
PEGASUS # md 0x60008000
60008000: 00000000 00000000 00000000 00000000    ................
60008010: 00000000 00000000 00000000 00000000    ................
60008020: 00000000 00000000 00000000 00000000    ................
60008030: 00000000 00000000 00000000 00000000    ................
60008040: 00000000 00000000 00000000 00000000    ................
60008050: 00000000 00000000 00000000 00000000    ................
60008060: 00000000 00000000 00000000 00000000    ................
60008070: 00000000 00000000 00000000 00000000    ................
60008080: 00000000 00000000 00000000 00000000    ................
60008090: 00000000 00000000 00000000 00000000    ................
600080a0: 00000000 00000000 00000000 00000000    ................
600080b0: 00000000 00000000 00000000 00000000    ................
600080c0: 00000000 00000000 00000000 00000000    ................
600080d0: 00000000 00000000 00000000 00000000    ................
600080e0: 00000000 00000000 00000000 00000000    ................
600080f0: 00000000 00000000 00000000 00000000    ................
PEGASUS # mw 0x60008000 0x11 0x2000
PEGASUS # md 0x60008000
60008000: 00000011 00000011 00000011 00000011    ................
60008010: 00000011 00000011 00000011 00000011    ................
60008020: 00000011 00000011 00000011 00000011    ................
60008030: 00000011 00000011 00000011 00000011    ................
60008040: 00000011 00000011 00000011 00000011    ................
60008050: 00000011 00000011 00000011 00000011    ................
60008060: 00000011 00000011 00000011 00000011    ................
60008070: 00000011 00000011 00000011 00000011    ................
60008080: 00000011 00000011 00000011 00000011    ................
60008090: 00000011 00000011 00000011 00000011    ................
600080a0: 00000011 00000011 00000011 00000011    ................
600080b0: 00000011 00000011 00000011 00000011    ................
600080c0: 00000011 00000011 00000011 00000011    ................
600080d0: 00000011 00000011 00000011 00000011    ................
600080e0: 00000011 00000011 00000011 00000011    ................
600080f0: 00000011 00000011 00000011 00000011    ................
PEGASUS # loadb 0x60008000 115200
## Ready for binary (kermit) download to 0x60008000 at 115200 bps...
 

from HOST PC
[root at localhost s3c24x0_uboot_dev]# cat ../hello_world > /dev/ttyS0
[root at localhost s3c24x0_uboot_dev]#


NOTE: got some junk data when cat the binary file....seems like u-boot is
trying to print the data it is receiving, on the console




+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

When used with kermit:


[root at localhost root]# kermit
C-Kermit 8.0.206, 24 Oct 2002, for Red Hat Linux 8.0
 Copyright (C) 1985, 2002,
  Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/root/) C-Kermit>
(/root/) C-Kermit>c
Connecting to /dev/ttyS0, speed 115200
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
                                                                                                 
PEGASUS # loadb 0x60008000 115200
## Ready for binary (kermit) download to 0x60008000 at 115200 bps...
                                                                                                 
(Back at localhost.localdomain)
----------------------------------------------------

(/root/) C-Kermit>show flow-control
 
Connection type:        modem
Current flow-control:   none
Switches automatically: no
 
Defaults by connection type:
  remote        : none
  direct-serial : none
  modem         : rts/cts
  tcp/ip        : none
  ssh           : none
  pipe          : none
 
(/root/) C-Kermit>send /home/banajit/pegasus/s3c24x0_uboot_dev/u-boot.bin
                                                                                                 
*************************
SEND-class command failed.
 Packets sent: 2
 Retransmissions: 11
 Timeouts: 12
 Damaged packets: 0
 Fatal Kermit Protocol Error: Too many retries
 
HINTS... If the preceding error message does not explain the failure:
 . Did you start a Kermit receiver on the far end?
 . Adjust the timeout method (see HELP SET SEND).
 . Increase the retry limit (see HELP SET RETRY).
 . Try it again with SET STREAMING OFF.
 . Try it again with SET PARITY SPACE.
 . As a last resort, give a ROBUST command and try again.
Also:
 . Be sure the source file has read permission.
 . Be sure the target directory has write permission.
(Use SET HINTS OFF to suppress hints.)
*************************
 
(/root/) C-Kermit>

-------------- next part --------------
set line /dev/ttyS0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] Loadb issue
  2006-07-19 13:19 Banajit Goswami
@ 2006-07-19 13:40 ` Wolfgang Denk
  2006-07-19 14:46   ` Banajit Goswami
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2006-07-19 13:40 UTC (permalink / raw)
  To: u-boot

Please don't top post/full quote. Follow the netiquette.
See for example http://www.netmeister.org/news/learn2quote.html

In message <bcbf88170607190619g6420e096s3127632b358fa191@mail.gmail.com> you wrote:
>
>  I am sending a log herewith with some of the commands' execution as well as
> the .kermrc file that I am using.

> ------=_Part_131115_18620348.1153315176549
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline

And STOP sending HTML!!!!

> PEGASUS # loadb 0x60008000 115200
> ## Ready for binary (kermit) download to 0x60008000 at 115200 bps...
>  
> 
> from HOST PC
> [root at localhost s3c24x0_uboot_dev]# cat ../hello_world > /dev/ttyS0
> [root at localhost s3c24x0_uboot_dev]#

This cannot work. The "loadb" command expects that you  transfer  the
data  using  kermit  binary  protocol, not just dumping some raw data
over the line.

> 
> NOTE: got some junk data when cat the binary file....seems like u-boot is
> trying to print the data it is receiving, on the console
> 
> 
> 
> 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> When used with kermit:
...
> (/root/) C-Kermit>send /home/banajit/pegasus/s3c24x0_uboot_dev/u-boot.bin

Kermit *binary* protocol means that you should send in *binary* mode,
so have to use the "/bin" option.

All this is written in good detail in the manual, so please RTFM!!!
See http://www.denx.de/wiki/view/DULG/UBootCmdGroupDownload

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
God grant me the senility to accept the things I cannot  change,  The
frustration  to  try to change things I cannot affect, and the wisdom
to tell the difference.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] Loadb issue
  2006-07-19 13:40 ` Wolfgang Denk
@ 2006-07-19 14:46   ` Banajit Goswami
  2006-07-19 15:25     ` Andreas Schweigstill
  2006-07-19 15:37     ` Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: Banajit Goswami @ 2006-07-19 14:46 UTC (permalink / raw)
  To: u-boot

On 7/19/06, Wolfgang Denk <wd@denx.de> wrote:
>
> Please don't top post/full quote. Follow the netiquette.
> See for example http://www.netmeister.org/news/learn2quote.html


Thanks for the pointer. Will maintain it in future.


And STOP sending HTML!!!!


I have no idea why it is sent as HTML. I am using my gmail account.



Kermit *binary* protocol means that you should send in *binary* mode,
> so have to use the "/bin" option.


I am using the command "set file type bin" in the .kermrc file. The file is
similar to what is mentioned in the website
http://www.denx.de/wiki/view/DULG/SystemSetup#Section_4.3.

All this is written in good detail in the manual, so please RTFM!!!
> See http://www.denx.de/wiki/view/DULG/UBootCmdGroupDownload


I am following the same procedure as mentioned.


Thanks and Regards
Banajit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060719/1f2e1faf/attachment.htm 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] Loadb issue
  2006-07-19 14:46   ` Banajit Goswami
@ 2006-07-19 15:25     ` Andreas Schweigstill
  2006-07-19 15:37     ` Wolfgang Denk
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Schweigstill @ 2006-07-19 15:25 UTC (permalink / raw)
  To: u-boot

Dear Banajit!

Banajit Goswami schrieb:
> I have no idea why it is sent as HTML. I am using my gmail account.

Nobody cares WHY you are sending as HTML! DO NOT SEND HTML to this
mailing list!

With best regards
Andreas Schweigstill

-- 
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstra?e 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] Loadb issue
  2006-07-19 14:46   ` Banajit Goswami
  2006-07-19 15:25     ` Andreas Schweigstill
@ 2006-07-19 15:37     ` Wolfgang Denk
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2006-07-19 15:37 UTC (permalink / raw)
  To: u-boot

In message <bcbf88170607190746g439e593fj1fc010fc44e8defd@mail.gmail.com> you wrote:
>
> I have no idea why it is sent as HTML. I am using my gmail account.

GGGGRRRRGHH... You are posting HTML *AGAIN*!

Please get a clue how to configure your mailer before posting again.

> I am using the command "set file type bin" in the .kermrc file. The file is
> similar to what is mentioned in the website

Similar may be not good enough.

> I am following the same procedure as mentioned.

Then it will work, a it does here.

> ------=_Part_133806_4365404.1153320374224
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline

Please STOP this!

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A year spent in artificial intelligence is enough to make one believe
in God.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-07-19 15:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-19 10:41 [U-Boot-Users] Loadb issue Banajit Goswami
2006-07-19 10:54 ` Andreas Schweigstill
2006-07-19 10:54 ` Kaushik karandikar
  -- strict thread matches above, loose matches on Subject: below --
2006-07-19 13:19 Banajit Goswami
2006-07-19 13:40 ` Wolfgang Denk
2006-07-19 14:46   ` Banajit Goswami
2006-07-19 15:25     ` Andreas Schweigstill
2006-07-19 15:37     ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.