PowerPC Cogent Hardware Setup

The eCos Developer’s Kit package comes with an EPROM which provides GDB support for the Cogent evaluation board. An image of this EPROM is also provided at loaders/powerpc-cogent/gdbload.bin under the root of your eCos installation. The same EPROM and image can be used on all three supported daughterboards: CMA287-23 (MPC823), CMA287-50 (MPC850), and CMA286-60 (MPC860).

The EPROM is installed to socket U4 on the board. Attention should be paid to the correct orientation of the EPROM during installation.

If you are going to burn a new EPROM using the binary image, be careful to get the byte order correct. It needs to be big-endian. If the EPROM burner software has a hex-editor, check that the first few bytes of the image look like:

00000000: 3c60 fff0 6063 2000 7c68 03a6 4e80 0020 <`..`c.|h..N.. 

If the byte order is wrong you will see 603c instead of 3c60 etc. Use the EPROM burner software to make a byte-swap before you burn to image to the EPROM.

If the GDB stub EPROM you burn does not work, try reversing the byte-order, even if you think you have it the right way around. At least one DOS-based EPROM burner program is known to have the byte-order upside down.

The GDB stub in the EPROM allows communication with GDB using the serial port at connector P12 (CMA101) or P3 (CMA102). The communication parameters are fixed at 38400 baud, 8 data bits, no parity bit and 1 stop bit (8-N-1). No flow control is employed. Connection to the host computer should be made using a dedicated serial cable as specified in the Cogent CMA manual.

Installing the Stubs into ROM

Preparing the Binaries

These two binary preparation steps are not strictly necessary as the eCos distribution ships with pre-compiled binaries in the directory loaders/powerpc-cogent relative to the installation root.

Building the ROM images with the eCos Configuration Tool

  1. Start with a new document - selecting the File->New menu item if necessary to do this.

  2. Choose the Build->Templates menu item, and then select the PowerPC CMA28x hardware.

  3. While still displaying the Build->Templates dialog box, select the “stubs” package template to build a GDB stub. Click OK.

  4. Build eCos using Build->Library.

  5. When the build completes, the image files can be found in the bin/ subdirectory of the install tree. GDB stub ROM images have the prefix “gdb_module”.

Building the ROM images with ecosconfig

  1. Make an empty directory to contain the build tree, and cd into it.

  2. To build a GDB stub ROM image, enter the command:

    $ ecosconfig new cma28x stubs 

  3. Enter the commands:

    $ ecosconfig tree
    $ make

  4. When the build completes, the image files can be found in the bin/ subdirectory of the install tree. GDB stub ROM images have the prefix “gdb_module”.

Installing the Stubs into ROM or FLASH

  1. Program the binary image file gdb_module.bin into ROM or FLASH referring to the instructions of your ROM programmer.

  2. Plug the ROM/FLASH into socket U4 as described at the beginning of this Hardware Setup section.