OVERVIEW
========

This directory contains three examples:
 ¤ BM Example
 ¤ Combined BC & BM Example
 ¤ Combined RT & BM Example

The BC example can be used together with the RT example. The RT has RT address
5. The BC will set up a transfer list with startup and shutdown sequence of
major frames, and a communication sequence of 8 Majorframes with TimeSync and
communication frame Sync.

The BC and RT examples can be run separately, however the BC and RT will be
stuck in the initialization procedure of the 1553.

The BM part of the BC&BM/RT&BM example monitors the 1553 bus. The BM DMA area log is
copied to a larger "non-DMA" area which may be compressed and copied to a Linux
PC using a TCP/IP socket. An example Linux TCP/IP application is included which
stores the 1553 log to a file for custom proccessing.

FILES
=====

 ¤ BM example
    - bm_logger.c               - BM Logger
    - config_bm.h               - 1553 BM Log Config for RTEMS & Linux app
    - ethsrv.c & .h             - 1553 BM Log Ethernet Server
    - rtems-gr1553bm.c          - RTEMS 1553 BM example application   

 ¤ Combined BC & BM example
    - bc_list.c                 - 1553 BC Transfer List creation/handling
    - bm_logger.c               - BM Logger
    - config_bm.h               - 1553 BM Log Config for RTEMS & Linux app
    - ethsrv.c & .h             - 1553 BM Log Ethernet Server
    - rtems-gr1553bcbm.c        - RTEMS BC & BM example application
    - linux_client.c            - Linux TCP/IP 1553 BM Log to file application

 ¤ Combined BC & BM example
    - bm_logger.c               - BM Logger
    - config_bm.h               - 1553 BM Log Config for RTEMS & Linux app
    - ethsrv.c & .h             - 1553 BM Log Ethernet Server
    - rtems-gr1553rtbm.c        - RTEMS 1553 RT & BM example application


 ¤ Driver Manager Configuration Files used in all examples:
    - config.c                        - Major Configuration, included from project
    - config_gr_rasta_io.c            - GR-RASTA-IO PCI Board Configuration
    - config_leon2_drvmgr.c           - Used in LEON2 non-PnP Systems (AT697 similar)
    - config_leon2_grlib_drvmgr.c     - Used in LEON2 GRLIB PnP Systems
    - config_leon3_drvmgr.c           - Used in LEON3 GRLIB PnP Systems

 ¤ BM Linux example client
    - linux_client.c            - Linux TCP/IP 1553 BM Log to file application
    - log-bc-rt-exttrig.txt     - BM LOG produced by BCBM and RTBM example viewed
                                  from BC. Note format is different from raw BM
				  LOG.

1553 Driver sources used
========================

The 1553 BC/BM/RT sources used by the examples:

 - gr1553.c               - BC, BM and RT device allocation driver
 - gr1553.h
 - gr1553bc.c             - BC Device driver
 - gr1553bc.h
 - gr1553bc_list.c        - BC List processing driver
 - gr1553bc_list.h
 - gr1553bm.c             - BM Device Driver
 - gr1553bm.h
 - gr1553rt.c             - RT Device Driver
 - gr1553rt.h


BUILDING EXAMPLES
=================
 1. Install Free RTEMS-4.10 toolchain from Aeroflex Gaisler web site.
 2. Install it to /opt/ and add /opt/rtems-4.10/bin to PATH
 3. run 'make' in this directory


TEST1 SETUP
===========
Test1 is an example setup with three boards:
 - A AT697+GR-RASTA-IO (BC) TimeMaster distibuting time via SpaceWire to
 - A LEON3 GR-RASTA-105 TimeSlave (BC). The GR1553B BC core distributes time onto a 1553 bus to
 - A Standard LEON3 with GR1553B RT core acting as a RT Time Slave

Test1 is a configuration of the 1553 examples, see test1 in Makefile.

The SpaceWire connector 0 on the GR-RASTA-IO must be connected to the
GR-RASTA-105 SpaceWire connector 0. It is needed for sending/receiving timecodes
generated by SPWCUC/GRCTM and Time-Packets generated by Software.

Note that ONLY the first Time-Packet send has the INIT bit set.

Build example by doing 'make test1', the binaries are found in the test1 
subdirectory:
 $ make test1
 $ ls -l test1/
