From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Samuelsson Date: Fri, 18 Apr 2008 07:52:46 +0200 Subject: [U-Boot-Users] Want to add command in uboot References: <20080418054127.54C50248B9@gemini.denx.de> Message-ID: <00be01c8a121$1c2971d0$0b0514ac@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >> >> 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