[U-Boot-Users] Re: Installing U-Boot on target via USB/serial using U-Boot commands
Jerry Van Baren
gerald.vanbaren at smiths-aerospace.com
Mon Sep 26 15:24:39 CEST 2005
Koen De Clercq (TELETASK) wrote:
> With the AT91RM92000 from ATMEL chip, there is an integrated uploader in
> the cpu that can work with USB, that's all I' know about it for now.
> One thing I sure: A USB cable is certainly the cheapest!
>
> Best regards,
>
> Koen
http://www.atmel.com/dyn/resources/prod_documents/doc1768.pdf
<blockquote>
7. Boot Program
7.1 Overview
[snip]
If no valid ARM vector sequence is found, the boot Uploader is started.
It initializes the Debug Unit serial port (DBGU) and the USB Device
Port. It then waits for any transaction and downloads a piece of code
into the internal SRAM via a Device Firmware Upgrade (DFU) protocol for
USB and XMODEM protocol for the DBGU. After the end of the download, it
branches to the application entry point at the first address of the SRAM.
</blockquote>
It looks like this is a very simple loader. It writes to SRAM _only_
and then jumps to that program (JTAG loaders typically allow you to
write to flash, manipulate registers, and jump anywhere, single step,
etc.). Theoretically you could load u-boot this way, but nobody has
volunteered that they have done it so you would likely be blazing a new
path.
*DISCLAIMER* all of the following is generalities and speculation.
Actual implementation is non-trivial. If I sound like I know something
about this, it is only because I've been in the "burn & learn" cycle
more than once ;-).
My advice would be to write a simple "burn flash" routine (it can be
done in a couple dozen lines of assembly - don't get elaborate) ORGed at
the start of SRAM and prepend it to the u-boot image. Your USB loader
(I'm guessing the target side looks like a simple usb-UART) would load
the burner utility and the u-boot image as a single lump and jump to the
burner utility. The burner utility would program the u-boot image from
SRAM into flash. Reset the board and you are off & running.
If your first attempt doesn't work, you are in the "burn & learn" cycle.
This can be successful if your image is close to working and you have
a fair amount of experience, or it can be an infinite time suck. If the
latter is the case, a JTAG debugger is invaluable.
Having said all that, this is pretty much off topic for u-boot. Only
after you get u-boot loaded into the target (and at least showing some
signs of life) would this become on topic for this list.
gvb
More information about the U-Boot
mailing list