world leader in high performance signal processing
Trace: » bf518f-ezbrd

BF518F-EZ-Board Quick Start

Introduction

The BF518F-EZ-Board uClinux Dist Board Support Package (BSP) provides you with an environment to develop Linux applications for the ADSP-BF518 Blackfin Processor.

This document provides a brief overview of how to get started using the BF518F-EZ-Board. A detailed document of the board, the Linux operating system, and the GNU toolchain can be found on the accompanying CD under the \docs\ directory or on the website at offline docs.

BSP Contents

This kit contains the BF518F-EZ-Board, the Open Source collection CD/DVD, and this document. There are 2 versions of this board, rev 0.2 and rev 1.0. They should be described in more detail here.

www.analog.com_static_imported-files_images_product_descriptions_bf518_ezkit.jpg

The schematics and layout files for this board are on the CD and can be found on the web at schematics. Full specifications for the ADSP-BF518 Blackfin processor can be found on the web at Blackfin Homepage.

Disc Contents

The disc contains might contain outdated releases of our toolchain, kernel, and bootloader. Please visit our homepage to make sure you start off with the latest releases.

Conventions

Some things to keep in mind while reading this guide:

  • When working with dip switches (the ones with numbers on one side), ON means the switch is away from the number
  • Das U-Boot (or just U-Boot) is the default boot loader used on Blackfin systems
  • Linux is the open source operating system typically run by U-Boot
  • Terminal emulators are programs that let you communicate with the board over the serial port

Toolchain Install

You will need to install the Blackfin Toolchain in order to work with Blackfin open source. Basically, visit the toolchain download page and download these files (where <version> is the latest version available):

  • blackfin-toolchain-<version>.i386.tar.bz2
  • blackfin-toolchain-uclibc-default-<version>.i386.tar.bz2

Then unpack them to /opt/uClinux/ by running the following command on each tarball:

$ sudo tar jxf <tarball> -C /

Then update your environment by running (you will need to do this in every new console; some people put this into their ~/.profile):

$ export PATH=/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin:$PATH

If everything went as planned, you can run:

$ bfin-uclinux-gcc --version
bfin-uclinux-gcc (ADI-trunk/git-e311b75) 4.3.5
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you do not see output like above, please consult the more comprehensive installing page.

Cables

Before we can talk to the board, we need to be properly connected to it. The three cables you will need here are:

  • the power supply that came with the board
  • a straight through serial cable (not a null modem or cross over cable)
  • an Ethernet cable

While the Ethernet cable is not strictly necessary as you can load files over the UART to U-Boot, it is significantly faster and will make open source development a much smoother process. So save yourself the hassle and get an Ethernet cable.

Once you have these cables, start connecting and configuring your system:

  1. Connect the serial port on your host computer to the serial port on the board using a serial cable
  2. Connect the Ethernet jack on your board to your local network with an Ethernet cable
  3. Start a terminal emulation program (Minicom or HyperTerminal) on your host computer with the settings:
    • 57600 baud
    • 8 data bits
    • parity none
    • 1 stop bit
    • h/w flow control off
  4. Connect the power cable to the board to power it on
  5. Hopefully you should see some LEDs flashing on the board
  6. Do not worry about what the board is doing right now as we will reset it as needed

Loading U-Boot

Before we can do anything useful, we need a boot loader to bootstrap the processor when powered on. This boot loader will then be used to load the Linux operating system (among many other things).

Your board might already have U-Boot on it, but for completeness sake, we'll assume it does not. If it does, you can skip this section if you see U-Boot output already in your terminal emulator.

Since we have a Blackfin processor that supports booting over the UART, we will use that to bootstrap the processor the first time. Then we can reprogram the flash and save the boot loader to flash. That way the board will be able to locate the boot loader automatically without requiring manual setup from you.

Please visit the U-Boot download page and download the ADSP-BF518F EZ Board tarball u-boot--uart-<version>.ldr which will be needed below.

You will want to configure the switches on the board as follows: Describe switch setup here someday

Now with your terminal emulator running, press the reset button (TBD) a few times. You should see no output. Press the space bar a few times and you should see one or two random bytes come back. Hit the reset button a few times again, and try the space bar again. If you still see a few bytes come back, then everything is connected properly. Now quit out of your terminal emulator and once it has exited, hit the reset button a few more times. If things did not go smoothly, please see the troubleshooting page.

Loading over the UART

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.

TFTP Upload

With U-boot up and running, we can program the u-boot-. If you do not already have a TFTP server running, then consult the setting up a TFTP server page.

First make sure ethernet is enabled by configuring the switches on the board as follows:

Make sure your board is configured to talk to the TFTP server. By default, the board uses the IP 192.168.0.15 and tries to connect to the server 192.168.0.2 via the gateway 192.168.0.1. You can check the env settings on the board:

bfin> print ipaddr
ipaddr=192.168.0.15
bfin> print serverip
serverip=192.168.0.2
bfin> print gatewayip
gatewayip=192.168.0.1

If you need different addresses, then simply change the value of these variables:

bfin> set ipaddr 192.168.1.100

Now that we are happy with the network settings, we will transfer the file to the board's external memory over Ethernet via tftp (the filesize might not match exactly your output):

bfin> tftp 0x1000 u-boot.
Using bfin_mac device
TFTP from server 192.168.0.2; our IP address is 192.168.0.15
Filename 'u-boot.ldr'.
Load address: 0x1000
Loading: ###############
done
Bytes transferred = 212528 (33e30 hex)

Verify the file transferred correctly by using the crc command on the board:

bfin> crc 0x1000 $(filesize)

Then compare the value to the crc computed on your host computer:

$ crc /tftpboot/u-boot.

They should of course match.

Flash Programming

We will now program U-Boot into the parallel flash on the board so that you can reboot the board and have U-Boot automatically run. For more details on utilizing parallel flash in U-Boot in general, consult the U-Boot parallel flash documentation.

First make sure parallel flash is connected to the processor by configuring the switches on the board as follows:

Now you should be able to query the flash and see output like so:

bfin> flinfo

To program the flash, you'll first want to unprotect all the relevant sectors:

bfin> protect off 0x20000000 +
 done
Un-Protected  sectors

Then erase them:

bfin> erase off 0x20000000 +
 done
Erased  sectors

Write the U-Boot image to the flash:

bfin> cp.b 0x1000 0x20000000 $(filesize)
Copy to Flash... done

Verify everything was written correctly (the exact byte count might not match your output):

bfin> cmp.b 0x1000 0x20000000 $(filesize)
Total of 212528 bytes were the same

Now your board should be all set to go! Change the boot mode switch so that the board will boot out of parallel flash:

Hit the reset button () and hopefully you should see U-Boot output on your console.