5.4. P&E Devices

P&E debug devices are supported. The P&E device partitions the device-url as follows:

pe:[//type[:number]][/key][?device-options]

The various parts are:

type

Specify the debug device type. The following debug device types are supported

  • USBMultilink
  • CycloneProMaxUSB
  • CycloneProMaxSerial
  • CycloneProMaxEthernet
  • ParallelPortCable
  • PCIBDMLightning

number

Specify the debug device number. Be aware that a device's number depends on whether other devices are concurrently accessed (this is a feature of the underlying P&E library).

key

Some P&E devices report unique device keys. This option allows you to select a device by its key, independently of USB device numbering.

Not all the separate parts of the device-url are required to uniquely define a particular device. If you specify more than required, the URL must be self-consistent. If you specify fewer components than required, the Sprite uses the first P&E device found that satisfies the specified components.

The key is the most robust mechanism for specifying a device, as it uses the unique ID of a particular P&E device. It is immune from renumbering issues, should boards be unplugged or inserted.

The following device-options are permitted:

speed=speed

Specify the speed of the connection. This is a clock divider value, so higher values are slower connection speeds. Refer to the P&E documentation for valid speed settings for your board.

memory-timeout=timeout

Some boards report memory errors for every access within a certain time of a genuine memory error. This option instructs the Sprite to compensate for this and retry a memory access that reports an error within the specified time of a prior error. If you need to use this option you need to increase GDB's protocol timeout by specifying set remotetimeout N at the GDB prompt.

debug=file

Write P&E debug information to file.

5.4.1. Connection Problems

If you get a message “Cannot load P&E library 'UNIT_CFZ.DLL'” or “Cannot load P&E library 'libUnit_cfz.so'”, you probably have not installed the P&E device software. This software is included with Sourcery G++ Lite; see Section 5.4.2, “Installing P&E Drivers” for installation instructions.

The message “Cannot find a matching debug device” means that no P&E device could be found matching the device-url that you used. Use the -i option to enumerate the devices available.

The message “Cannot force background mode” can occur if you connect at too high a speed. Try slowing the connection by increasing the speed= option in the device URL.

5.4.2. Installing P&E Drivers

On Windows, the P&E driver is installed by Sourcery G++ Lite. If the P&E driver installation fails (for example, with an error about missing files), it may mean that you already have another copy of the drivers previously installed on your computer. Note that P&E drivers are not removed automatically when uninstalling Sourcery G++ Lite; you must do that separately using Add/Remove Software from the Windows control panel.

To reinstall the drivers on Windows, follow these steps:

  1. Complete the Sourcery G++ Lite installation.

  2. Turn off your system and disconnect all P&E devices.

  3. Reboot the system and use Add/Remove Software, available through the Windows control panel, to check for and remove any previously-installed P&E drivers.

  4. Run libexec/m68k-linux-gnu-post-install/sprite-drivers/pe_drivers_install.bat to reinstall the drivers.

  5. Turn off your system and connect all P&E devices.

  6. Reboot the system and start using Sourcery G++ Lite.

On Linux, the P&E driver is a loadable kernel module that has to be compiled for your system. You need kernel headers and a native C compiler for your system. The package is pe_driver_ver_324_811.tar.gz and is in the libexec/m68k-linux-gnu-post-install/sprite-drivers subdirectory of your Sourcery G++ Lite installation. You should unpack that file, and use the setup.sh script to build and install it. You should manually remove all files of a previous install before building this module.

These drivers are provided by P&E Microcomputer Systems.