[U-Boot-Users] Want to add command in uboot

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

Avinash Vijayvergia wrote:
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 ______________________________________________________________________

In message 895609.34146.qm@web39508.mail.mud.yahoo.com 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.
--0-479714745-1208472486=:34146 Content-Type: text/html; charset=us-ascii
Please never post HTML here!
Best regards,
Wolfgang Denk

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?).
Best regards,
Wolfgang Denk
Best Regards Ulf Samuelsson
participants (4)
-
Aras Vaichas
-
Avinash Vijayvergia
-
Ulf Samuelsson
-
Wolfgang Denk