5.5. Command Converter Server Devices

The Sourcery G++ Debug Sprite supports devices such as the CodeWarrior Ethernet TAP and USB TAP that are controlled by the Command Converter Server (CCS) utility. You need to start CCS separately before connecting to the debug device from GDB; see Section 5.5.1, “Starting CCS”.

The Sprite partitions the CCS device-url as follows:

ccs:[//host[:port]][/chainpos][?device-options]

The host and port indicate the location of the CCS port to connect to. The chainpos (a number) indicates where the ColdFire debug device is in the CCS chain.

The following device-options are permitted:

speed=speed

Specify the speed used to connect to the target. This is specified in KHz by default. You can use MHz and KHz suffixes.

timeout=timeout

This specifies the timeout, in seconds, used for communication with the Command Converter Server.

As an example, if CCS is listening on port localhost:41475, connect GDB to the board with:

(gdb) target remote | \
  m68k-linux-gnu-sprite ccs://localhost:41475 m54455evb

5.5.1. Starting CCS

CCS is included with Sourcery G++ Lite; you do not need to have the CodeWarrior tools installed. You can find the CCS executable in the m68k-linux-gnu/ccs/bin subdirectory of your Sourcery G++ Lite installation.

The server can be started by clicking on the CCS icon, or by entering ccs on the command line. You can use the -nogfx option to use its command-line interface rather than having it create a GUI window.

Use the following commands to initialize the server:

% delete all
% config port port
% config cc device
% config client all

The port number is the TCP/IP port the server listens on, and is what you should use in the Sprite's URI. The device indicates what target device should be used. For USB devices use utap for COP/OnCE and utap_dpi for BDM or DPI. For Ethernet devices use powertap for COP/OnCE and powertap_dpi for BDM or DPI. If you have multiple devices of you can append a :serial-number to the USB device name. The eight-digit serial-number is located on the underside of the TAP device just after the revision information. For Ethernet devices append the device's IP address.

In summary, to connect to a COP/OnCE target using an Ethernet TAP:

% config cc powertap:1.2.3.4

To connect to a BDM or DPI target using an Ethernet TAP:

% config cc powertap_dpi:1.2.3.4

To connect to a COP/OnCE target using a USB TAP:

% config cc utap

To connect to a BDM or DPI target using a USB TAP:

% config cc utap_dpi

You can use the config save command to save the configuration for later use. The show cc command shows you the current configuration. The show port command shows you the port number CCS is serving.

5.5.2. Common CCS Errors

Here are some common error messages and their causes:

Cable disconnected

The target board is not powered up, the board hardware is faulty or in a bad state or the jumper settings are incorrect.

CC not present

The required Command Converter is not present. You did not use utap_bdm or utap_dpi to connect CCS to a BDM or DPI TAP device connection.

Core not responding

CCS is no longer has control of the target system. The board hardware is faulty or in a bad state, the board initialization settings are incorrect or there is another debugger configuration problem.

USB open failure

For a Windows host, the USB driver on the host computer is hung. Unplug/replug the USB tap, or reboot the host PC if the problem persists. This might also happen if the USB drivers were not installed. You may install USB drivers manually from m68k-linux-gnu\ccs\drivers subdirectory of your Sourcery G++ Lite installation.

For a Linux host this can occur if the permissions are not set correctly. Try running CCS as root, and if this resolves the problem, review the instructions in m68k-linux-gnu/ccs/drivers/usb subdirectory of your Sourcery G++ Lite installation for setting up USB permissions.

Maximum number of Command Converters reached

You have tried to reconfigure without first deleting the current configuration.

Cannot reset to debug mode

This can indicate that the clock speed is too high. Try a lower clock speed with the speed= option in the device URL.