
This example demonstrate how to implement a SpaceWire device,
connect it to a grspw2, and have the grpsw2 to send a message to the
implemented device.

First, build the example using make.
Note: edit the make file to point to the correct temu installation path.
Note: rtems gcc compiler is required to compile the obsw. Edit the make file
to have the correct path to the compiler.

Run temu and use the following commands to instantiate the ut700, instantiate
the implemented device, connecte the device to grspw2_1 and run the obsw:

    plugin-append-path /opt/temu/2.2.0+debug-no-opt/share/temu/examples/spw-plugin
    import SpWDevice
    import BusModels

    exec ut700.temu
    SpwDevice.new name=spwTestDev0

    spw-connect port1=spw1:SpwPortIface[0] port2=spwTestDev0:SpwPortIface

    load obj=cpu0 file=/opt/temu/2.2.0/share/temu/examples/spw-plugin/obsw.elf
    cpu-set-pc cpu=cpu0 pc=0x40000000
    cpu-set-reg cpu=cpu0 reg="%fp" value=0x40040000
    cpu-set-reg cpu=cpu0 reg="%sp" value=0x40040000

    run obj=cpu0 time=2.0
    plugin-append-path /opt/temu/2.2.0/share/temu/examples/spw-plugin
    import SpWDevice
    import BusModels

    exec ut700.temu
    SpwDevice.new name=spwTestDev0

    spw-connect port1=spw1:SpwPortIface[0] port2=spwTestDev0:SpwPortIface

    load obj=cpu0 file=/opt/temu/2.2.0/share/temu/examples/spw-plugin/obsw.elf
    cpu-set-pc cpu=cpu0 pc=0x40000000
    cpu-set-reg cpu=cpu0 reg="%fp" value=0x40040000
    cpu-set-reg cpu=cpu0 reg="%sp" value=0x40040000

    run obj=cpu0 time=2.0
