Skip to contentSkip to conversation

Want to add command in uboot

U-Boot-Users Avinash Vijayvergia 4 participants 4 messages Apr 17, 2008 – Apr 18, 2008

lore
Share & tools
lore
#0 lore raw

Hi

I am working on AT91SAM9260. I want to add one command "COM1 xxx" to the uboot command set. After typing this command on uboot prompt the string xxx should be transmitted out of COM1 and any reception on COM1 should be displayed on the debug terminal. Can some one suggest me how to do this?

Thanks
Avinash

      ____________________________________________________________________________________

Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080417/8bd7e5bf/attachment.htm

#1 lore raw
Quoted 8 lines · Avinash Vijayvergia

Hi

I am working on AT91SAM9260. I want to add one command "COM1 xxx" to the uboot command set. After typing this command on uboot prompt the string xxx should be transmitted out of COM1 and any reception on COM1 should be displayed on the debug terminal. Can some one suggest me how to do this?

AT91SAM9260 has no "COM1", this is a PC term.

Have you looked at the source code?

Have you read the documentation that comes with U-Boot? There is a whole directory full of useful information in ./doc

e.g. doc/README.commands

This file tells you about how to add your command. Also look at how all the other commands are done.

Then look in the ./common directory. There is a file called serial.c. Maybe this file contains function calls for the serial port?

Then take a look at the ./board/... files and see how other people send/receive data via the serial port.

Aras

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

#2 lore raw
In reply to Avinash Vijayvergia
Quoted 3 lines · In message <[email protected]> you wrote:

I am working on AT91SAM9260. I want to add one command "COM1 xxx" to the uboot command set. After typing this command on uboot prompt the string xxx should be transmitted out of COM1 and any reception on COM1 should be displayed on the debug terminal. C an some one suggest me how to do this?

I recommend to get a better understanding of the existing U-Boot code first. Then you will see that no such command is needed. Support for multiple serial devices is already present.You just have to enable this correctly in your configuration. To switch I/O channels, a simple "setenv" command will be sufficient.

Quoted 2 lines

--0-479714745-1208472486=:34146
Content-Type: text/html; charset=us-ascii

Please never post HTML here!

Best regards,

Wolfgang Denk

Signature · 4 lines
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
Speed of a tortoise breaking the sound barrier         = 1 Machturtle
#3 lore raw
Quoted 11 lines
Quoted 3 lines

I am working on AT91SAM9260. I want to add one command "COM1 xxx" to the uboot command set. After typing this command on uboot prompt the string xxx should be transmitted out of COM1 and any reception on COM1 should be displayed on the debug terminal. C an some one suggest me how to do this?

I recommend to get a better understanding of the existing U-Boot code first. Then you will see that no such command is needed. Support for multiple serial devices is already present.You just have to enable this correctly in your configuration. To switch I/O channels, a simple "setenv" command will be sufficient.

I think that he wants to have the console on DBGU (Debug UART),

COM1 "xxx" will send the string to UART1, and a response is received on UART1. The response should be echoed on DBGU

Is that really possible?

I would do it a bit different though.
I would have a command which puts u-boot in a transparent mode just forwarding any incoming data on the DBGU to the selected USART (or SPI or whatever).
All incoming data on the selected channel is forwarded to DBGU.

Aborted by pressing a combination of keys (Ctrl-C three times?).

Quoted 4 lines

Best regards,

Wolfgang Denk

Best Regards
Ulf Samuelsson