world leader in high performance signal processing
Trace: » flashing

Flashing your Board

The first time you attempt to turn on your board, you need to make sure that the processor can boot from something. To do this, you need to install the JTAG tools from the Blackfin website.

JTAG Tools is a software package which enables working with JTAG-aware (IEEE 1149.1) hardware devices (parts) and boards through JTAG adapter.

This package has open and modular architecture with ability to write miscellaneous extensions (like board testers, flash memory programmers, and so on).

JTAG Tools package is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for JTAG Tools. Please read COPYING file for more info.

Warning: This software may damage your hardware! Care should be taken before using this software - including reading this entire document before attempting to use the software.

Supported host operating systems

JTAG Tools should run on all Unix like operating systems that include a parallel port. We only test things on Linux.

Required software

  • readline (it is probably a standard part of your distribution)

Build & installation instructions

  1. Download and install required software (see previous section).
  2. Download and unpack jtag sources.
  3. Run ./configure script. Use optional --with-include parameter if required. See `./configure --help` for more info.
  4. Run `make`.
  5. As root, run `make install`.

Testing JTAG Tools

Connect your JTAG adapter between your PC and target device and turn on your target device.

To run JTAG Tools type “jtag” and press <Enter>. jtag should start and display some initial informations. Output should end with line like this:

jtag>

This is “jtag command prompt”. Type “help” and press <Enter> for initial help about available commands. To exit JTAG Tools type “quit” and press <Enter>.

Selecting JTAG cable and parallel port address

There are two methods of talking to the Parallel Port device.

  1. direct through memory accesses (must be root)
  2. via the /dev/parportn device

Type “help cable” for list of supported JTAG cables.

Direct Memory Access

To set things up as direct memory accesses, you must be running as root.

To find out where the parallel port is sitting in Memory (or if the BIOS has it turned on):

> dmesg | grep parport
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
parport0: irq 7 detected
parport1: PC-style at 0xddb0 [PCSPP,TRISTATE,EPP]
lp0: using parport0 (polling).
lp1: using parport1 (polling).
parport0: cannot grant exclusive access for device ppdev0
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
parport0: irq 7 detected
parport1: PC-style at 0xddb0 [PCSPP,TRISTATE,EPP]
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]

There are two parallel ports on this machine, one at 0x378 (parport0) and 0xddb0 (parport1). If I have an ExcelPoint IGLOO connected to parallel Port 0, I would type:

jtag> cable parallel 0x378 IGLOO
Initializing ExcelPoint IGLOO JTAG Cable on parallel port at 0x378

/dev/parport

If things are set up properly, you can use the device /dev/parport0 as a normal user (which is suggested - running things as root is always a bad idea)

  • check to make sure the /dev/parport0 is read/write
    > ls -l /dev/parport0
    crw-rw-rw-  1 root root 99, 0 2005-07-08 10:42 /dev/parport0
  • check to make sure that the /dev/parport0 is not being used. If cups (a linux printing system is using this, a file “lp” will be in this directory.
    > ls -l /proc/sys/dev/parport/parport0/devices/
    total 0
    -r--r--r--  1 root root 0 2005-07-08 17:56 active

    Then it is simply (as a normal user)

    jtag> cable ppdev /dev/parport0 IGLOO
    Initializing Excelpoint IGLOO JTAG Cable on ppdev port /dev/parport0

Testing the JTAG connection

Now that a connection has been made between the PC and the cable, you must make sure that the cable can talk to the target (the Blackfin). This is done by detect parts on the JTAG chain. Type “detect” at the jtag command prompt:

jtag> detect
IR length: 5
Chain length: 1
Device Id: 00110010011110100101000011001011
  Manufacturer: Analog Devices
  Part:         BF533
  Stepping:     3
  Filename:     /usr/local/share/jtag/analog/bf533/bf533

If you get empty output or an error message your JTAG adapter is not connected properly, or your target board doesn't work, or it is turned off.

“detect” command is required before all other commands.

To ensure that things are working - you can check the status of the chain by using the print command:

jtag> print chain
 No. Manufacturer              Part                 Stepping Instruction          Register
---------------------------------------------------------------------------------------------
   0 Analog Devices            BF533                3        BYPASS               BR

Depending on what you want to do, you can go to the next step