Flash memory on your development platform should come preloaded with a working U‑Boot. However, if you are either:
You can bootstrap the board from your development system in a few different ways. Here we will document the two most common methods:
Before you can try programming U-Boot into the flash, you need to know what file to program. Please consult the binaries page for more information.
So you need to load an initial version of U-Boot onto the flash. There are currently a couple JTAG solutions known to work (there may be more!). Visit the JTAG page for more information.
You should be able to avoid picking a specific cable driver by letting urjtag discover the devices for you. Simply run:
jtag> cable probe
If an appropriate device is attached, then it should be found and selected automatically.
The IGLOO connects to the Blackfin board's JTAG via the parallel port on the development system. Once a JTAG connection is established, the appropriate U-Boot file can be loaded into flash memory.
Make sure you have the required software for flashing installed on your system. You can also consult the gdbproxy debugging page for information on installing gdbproxy.
Launch the jtag tool as root (or make sure your account has appropriate permissions to access the parallel port):
$ sudo jtag
Then run the commands (tweak according to your platforms/needs):
jtag> cable parallel 0x378 WIGGLER jtag> detect jtag> initbus bf533_stamp jtag> detectflash 0x20000000 jtag> endian little jtag> flashmem 0x20000000 /path/to/your/u-boot/file jtag> instruction BYPASS jtag> shift ir jtag> quit
If you pass one or more files to jtag, it will enter batch mode. In the batch mode, it will read and run instructions from the files passed to it as the arguments. It will be useful if you have to flash many boards.
The JTAG Blue is a different parallel port cable. Be sure to make the wiring modifications specified. Run same commands as the IGLOO JTAG, but start off with:
jtag> cable parallel 0x378 DLC5
You can also use JTAG to initialize the processor, load U-Boot into the external memory, and then start executing it from there. With U-Boot running on the processor, you can then update your flash/storage devices by using U-Boot itself. This process is documented in the debugging document.
This feature is not available on all Blackfin variants, see boot mode availability.
Once you've verified your Blackfin processor supports this mode and you've hooked up to the correct UART (some Blackfins have multiple UARTs and not all are bootable), we can begin.
First you will need a U-Boot LDR which can boot over the UART. Precompiled U-Boot images are available already for some boards. Look for the LDR file with UART in its name for your board. If there is no precompiled image for your board available, you will have to make your own. Consult the porting document for how to change the boot mode for UART booting.
Next, you will most likely need to change the boot mode setting on your board so that the processor knows to load the LDR over the UART upon reset. Since this step is board specific, please consult the boards page. Once the boot mode is changed, you should hit the reset button a few times to make sure the processor is executing the Boot ROM.
Now we move on to the fun part. There are two utilities available for transmitting the LDR over your development system's serial port to the Blackfin processor:
The LDR Utils package is part of the Blackfin toolchain (on all hosts - including Windows™). Simply feed it the LDR to load, the serial device to load over, and then run a terminal program to connect to the board.
If this fails, try consulting the troubleshooting section.
The ldr-utils can be used to load applications over the UART (for those parts which support it over the BootROM).
$ bfin-uclinux-ldr -l /tftpboot/u-boot.ldr /dev/ttyUSB0 && kermit -l /dev/ttyUSB0 -b 57600 -C connect Loading LDR /tftpboot/u-boot.ldr ... OK! Opening /dev/ttyUSB0 ... OK! Configuring terminal I/O ... OK! Trying to send autobaud ... OK! Trying to read autobaud ... OK! Checking autobaud ... OK! Autobaud result: 115200bps 49.766mhz (header:0xBF DLL:0x1B DLH:0x00 fin:0x00) Sending blocks of DXE 1 ... [1/2] [2/2] OK! Sending blocks of DXE 2 ... [1/6] [2/6] [3/6] [4/6] [5/6] [6/6] OK! You may want to run minicom or kermit now Quick tip: run 'ldrviewer <ldr> <tty> && minicom' Connecting to /dev/ttyUSB0, speed 57600 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ---------------------------------------------------- 0 bfin> version U-Boot-1.1.3-ADI (Sep 28 2006 - 16:16:44) bfin>
> bfin-uclinux-ldr -l /tftpboot/u-boot.ldr /COM1 Loading LDR /tftpboot/u-boot.ldr ... OK! Opening /COM1 ... OK! Configuring terminal I/O ... OK! Trying to send autobaud ... OK! Trying to read autobaud ... OK! Checking autobaud ... OK! Autobaud result: 115200bps 49.766mhz (header:0xBF DLL:0x1B DLH:0x00 fin:0x00) Sending blocks of DXE 1 ... [1/2] [2/2] OK! Sending blocks of DXE 2 ... [1/6] [2/6] [3/6] [4/6] [5/6] [6/6] OK! You may want to run minicom or kermit now
Now, run your favorite Windows terminal program.
Tools → UART Boot….Reset button on the board to force it into a sane state.If the load fails at the Trying to read autobaud or Checking autobaud steps, this boils down to a communication problem with the Blackfin board. Some things that people commonly make mistakes with:
A low level test to see if the blackfin can communicate with the host PC is:
ldr utils:rgetz@pinky:~> kermit -l /dev/ttyUSB0 -C connect Connecting to /dev/ttyUSB0, speed 57600 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------
��
If you get back something every time you hit a key (and aren't resetting the processor), your connection is probably in loop back mode. Check your cable and the UART jumpers/switches on the board as mentioned above.
If the Blackfin responds just once per reboot, then things should be OK. If you don't see any output, check the above listed issues.
bfin-*-ldr util again.
The VDSP Flash Programmer expects files to be in the hex format by default, but it can be told to program a binary file as well. For information on how to convert to the hex format, see the binaries page for more information.
First launch Visual DSP on your Windows system and connect to the board with your ICE. Now, launch the Flash Programmer utility by going to the Tools menu and selecting Flash Programmer.
Select the driver that is appropriate for your board and the flash and load it.
In the files section, select the U-Boot file that you're going to program. Make sure the format radio buttons match that of the file you've selected. Ensure that the radio button “Erase all” is selected. Then click on the Load File button. The bar at the bottom of the screen should start to fill up showing the status of the process. When this is done you should be able to reset your board and see the U-Boot start up screen on your terminal program.