===========================================================================
####COPYRIGHTBEGIN####
                                                                          
 -------------------------------------------                              
 The contents of this file are subject to the Red Hat eCos Public License 
 Version 1.1 (the "License"); you may not use this file except in         
 compliance with the License.  You may obtain a copy of the License at    
 http://www.redhat.com/                                                   
                                                                          
 Software distributed under the License is distributed on an "AS IS"      
 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the 
 License for the specific language governing rights and limitations under 
 the License.                                                             
                                                                          
 The Original Code is eCos - Embedded Configurable Operating System,      
 released September 30, 1998.                                             
                                                                          
 The Initial Developer of the Original Code is Red Hat.                   
 Portions created by Red Hat are                                          
 Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
 All Rights Reserved.                                                     
 -------------------------------------------                              
                                                                          
####COPYRIGHTEND####
===========================================================================

2000.02.03

How to build and install the GDB module on the MBX board

Make GDB module
~~~~~~~~~~~~~~~
Configure and build using the 'stubs_old_scheme' template for the MBX
target. These are the necessary CLI instructions. It can also be done
from the Configtool by selecting the appropriate templates.

 % cd /tmp
 % mkdir stubs
 % cd stubs
 % ecosconfig new mbx stubs_old_scheme
 % ecosconfig tree
 % make

This will install some files in ./install/bin:

 cygmon.img:   The built stubs image
 cygmon.bin:   The image converted to binary (suitable for burning to ROM)
 cygmon.srec:  The S-Record image (suitable for flash programming, see below)


Prepare board for flash programming
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This assumes you have EPPC-Bug in the on-board flash. This can be determined
by setting up the board according to the below instructions and powering
up the board. The EPPC-Bug prompt should appear on the SMC1 connector at
9600 baud, 8N1.

 1. Set jumper 3 to 2-3     [allow XU2 flash to be programmed]
 2. Set jumper 4 to 2-3     [boot EPPC-Bug]


Program FLASH
~~~~~~~~~~~~~
 1. Prepare EPPC-Bug for download:

       EPPC-Bug>lo 0

    At this point the monitor is ready for input. It will not return the
    prompt until the file has been downloaded.

 2. Use the terminal emulator's ASCII download feature (or a simple clipboard
    copy/paste operation) to download the gdb_module.srec data.

     Note: On Linux, Minicom's ASCII download feature seems to be broken.
           A workaround is to load the file into emacs (or another editor)
           and copy the full contents to the clipboard. Then press the
           mouse paste-button (usually middle) over the Minicom window.

 3. Program the flash with the downloaded data:

       EPPC-Bug>pflash 40000 60000 fc000000

 4. Switch off the power, and change jumper 4 to 1-2. Turn on the power
    again. The board should now boot using the newly programmed stubs.

