world leader in high performance signal processing
Trace: » jtagconsole

Das U-Boot JTAG Console

The Blackfin JTAG provides a method for passing data to and from the Blackfin core while it is still running. Basically, a gdbproxy process will listen via TCP/IP and take care of passing data via JTAG to/from the core. For more backend details, see this page.

Das U-Boot provides a standard console driver so that you can use this channel to talk to the board without a serial cable. The console driver has the name jtag, so you can use that with the normal console environment variables.

This document assumes you already have a supported JTAG cable connected to your development host and the board and that it works.

Enabling JTAG Console

Use this define in your board config header file:

#define CONFIG_JTAG_CONSOLE 1

The option CONFIG_UART_CONSOLE_IS_JTAG can be used to have the JTAG console replace all the serial routines.

If you want to have it used when booting a system, then you probably want to use the setting:

#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1

See also the CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE setting. These are documented in the toplevel README file for more information.

Using JTAG Console

U-Boot Devices

Tell U-Boot to use the JTAG console device for input/output:

bfin> set stdin jtag; set stdout jtag; set stderr jtag

Host Machine

First you have to launch bfin-gdbproxy. This will connect to the board via JTAG and set up the communication channel automatically. The italizaed output below shows that gdbproxy is now listening via TCP/IP on port 2001.

$ bfin-gdbproxy -q bfin
Found USB cable: gnICE+
Connected to libftdi driver.
IR length: 5
Chain length: 1
Device Id: 00110010011111001000000011001011 (0x327C80CB)
  Manufacturer: Analog Devices, Inc. (0x0CB)
  Part(0):      BF537 (0x27C8)
  Stepping:     3
  Filename:     /usr/local/src/blackfin/toolchains/20100424/bfin-elf/bin/../share/urjtag/analog/bf537/bf537
warning:   bfin: no board selected, BF537 is detected
notice:    bfin: jc: waiting on TCP port 2001
notice:    bfin-gdbproxy: waiting on TCP port 2000

Now you can connect with telnet or netcat to that port and data will be sent to the U-Boot console. Any output from U-Boot will be sent back via the network. There is also a jtagconsole helper script include in the U-Boot source tree.

$ ./tools/jtagconsole
NOTE: the interrupt signal (normally ^C) has been remapped to ^T
bfin> bdinfo
U-Boot      = U-Boot 2010.03-00032-g650afc0 (ADI-2010R1-pre) (Apr 06 2010 - 23:39:54)
CPU         = bf537-0.2
Board       = bf537-stamp
VCO         =    500 MHz
CCLK        =    500 MHz
SCLK        =    125 MHz
boot_params = 0x00000000
memstart    = 0x00000000
memsize     = 0x04000000
flashstart  = 0x20000000
flashsize   = 0x00400000
flashoffset = 0x00000000
ethaddr     = 00:e0:22:fe:58:70
ip_addr     = 192.168.1.15
baudrate    = 57600 bps
bfin>