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.
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.
Start with a new document - selecting the File->New menu item if necessary to do this.
Choose the Build->Templates menu item, and then select the PowerPC CMA28x hardware.
While still displaying the Build->Templates dialog box, select the “stubs” package template to build a GDB stub. Click OK.
Build eCos using Build->Library.
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”.
Make an empty directory to contain the build tree, and cd into it.
To build a GDB stub ROM image, enter the command:
$ ecosconfig new cma28x stubs |
Enter the commands:
$ ecosconfig tree $ make |
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”.
Program the binary image file gdb_module.bin into ROM or FLASH referring to the instructions of your ROM programmer.
Plug the ROM/FLASH into socket U4 as described at the beginning of this Hardware Setup section.