8.3.3. DCC modes

If your target application communicates using DCC, you must configure the DCC mode. The DCC modes you can set are:

Mode 1: raw DCC

In this mode, the data is fed over TCP/IP ports 5000, 5001,... . Data is sent from the host to the target 4 bytes at a time. If fewer than 4 bytes are available, the data is padded with 0 bytes until it is 4 bytes long. Data from the target to the host is received 4 bytes at a time, and no padding or trimming is performed.


It is recommended that you use the Virtual Ethernet/TTY mode (mode 2). If the Virtual Ethernet/TTY mode is unsuitable for your application, then you can use mode 1 DCC but you must also implement a suitable communications protocol.

Mode 2: Virtual Ethernet/TTY mode

Virtual Ethernet/TTY is used for providing virtual serial and Ethernet connections to the target.

Virtual Ethernet/TTY mode

Virtual Ethernet/TTY mode is a RealView ICE facility that provides (as far as the debug host and the target are concerned):

  • A virtual Ethernet facility using the DCC channel and a collection of software tools in RealView ICE and the host PC. It enables TCP/IP to be used to the target as though the target has an Ethernet port of its own.

  • A virtual serial port facility using the DCC channel and a collection of software tools in RealView ICE and the host PC.

Setting DCC parameters

Ethernet bridging works by examining incoming packets at RealView ICE, then deciding which are destined for RealView ICE itself and which are destined for the target. To do this, RealView ICE must know the IP address, subnet mask and default gateway parameters for the target. These parameters are normally determined through DHCP, where the target asks for a configuration, and one is supplied by a server over the network. In this case, RealView ICE is able to intercept the incoming DHCP packet containing the parameters and configure itself appropriately. It is, however, possible to configure a target with a static IP address. In this case there is no DHCP transaction to intercept, and RealView ICE has no way of determining the target configuration. You must set these parameters in RealView ICE for correct operation.

DCC Ethernet bridging is configured using rvigdbconfig, and you must set the appropriate parameter when using DCC mode.

The rvigdbconfig utility has the following command syntax:

rvigdbconfig [-hv] [-f rvc file] [-d DEVICE:MODE] [-s core-number:ip-config]

The options are:


Print this message.


Print progress messages.


Set the DCC mode for the device DEVICE to MODE, where MODE can be one of:


None (raw DCC)


Redirected raw DCC


Virtual Ethernet over DCC.


Set the DCC mode for the device DEVICE to MODE, where IP-CONFIG is of the form ip-address:subnet-mask:default-gateway.


Load scan chain configuration from RVC-FILE.

For example:

rvigdbconfig –f rvi.rvc -d 1:2

sets device 1 (the first device on the scan chain) to DCC mode 2.

Additional devices are configured in a similar way. For example:

rvigdbconfig –f rvi.rvc -d 1:2 -d 2:2

configures devices 1 and 2 to mode 2.

The IP parameters for static IP configurations are set up in the following way:

rvigdbconfig –f rvi.rvc –d 1:2 –s 1:

This configures device 1 to use DCC mode 2 with IP address, subnet mask, and default gateway This format can be used to configure multiple cores if required. For example:

rvigdbconfig –f rvi.rvc –d 1:2 –d 2:2 –s 1: –s 2:

For more details on communicating over DCC, see Procedure for debugging applications through Target-GDB connections.

If using rviload, you must set VEC or VEP. (See the allowed MODE values under rviload command syntax.)


When Ethernet bridging is running, normal LAN services are accessible (including DHCP and NFS).

To configure static IP addresses when using virtual Ethernet, see Configuration of static IP addresses for virtual Ethernet.

DCC and interrupts

The use of DCC interrupts has significant speed implications when using Virtual Ethernet/TTY mode. If possible, you must tie DCC interrupts into the interrupt system of the target and be able to enable and disable the read and write interrupt individually.


This is a configuration item that you must select when configuring the kernel, when using an ARM driver.

RealView ICE uses JTAG to control debug operations, and JTAG is used to send and receive data over DCC. RealView ICE polls the target JTAG for status:

  • If interrupts are used, the target is interrupted when data is written to the DCC register or read from it. This enables the target to deal quickly with the data, and continue normal processing.

  • If interrupts are not available, the target must regularly poll the DCC register for any new data. This means that the target wastes time checking the register for data when none is present. Subsequent data is only discovered at the next poll.

If RealView ICE finds that there is data to be transferred into or out of DCC, it attempts to transfer as many words as possible in one burst, up to a predefined limit. However, if the target has not sent more data or emptied its transfer register, RealView ICE breaks out of its burst and begins polling the execution status and DCC.

Copyright © 2002, 2004-2008 ARM Limited. All rights reserved.ARM DUI 0155J