RTXC Quadros Example Applications
The RTXC Quadros Example Applications can be compiled and downloaded to the M523xBCC
target hardware from the Quadros\Examples\Quadros_ss\Mcf523x\M5282BCC\Projects\gnu
directory.  Similarly, the example applications can be compiled and downloaded to the M5282LITE
target hardware from the Quadros\Examples\Quadros_ss\Mcf5282\M5282LITE\Projects\gnu
directory.  The documentation will refer to this "gnu" subdirectory as the GNU Project directory.
The documentation will assume that the GNU Project directory is the current working
directory.  For example, the main source code for the example applications is located
in ..\..\C_Source.  For the M5282LITE target, the full path to this directory would
be Quadros\Examples\Quadros_ss\Mcf5282\M5282LITE\C_Source.
- example.c
 
- 
This is the default example application compiled by the Makefile.
 
example0.c
 
- 
Simple echo application using the serial port.
 
example1.c
 
- 
A simple state machine.
 
example2.c
 
- This example application demonstrates a state machine
with three states.  The state machine is started by
the expiration of SALARM3.  Only one thread object,
THREAD1, is used.  The entry points entry_point1(),
entry_point2(), and entry_point3() represent the three
states.  State transitions are implemented using
TS_DefThreadEntry().
 
example3.c
 
- 
This example application demonstrates a state machine
with three states.  The state machine is started by
the expiration of SALARM3.  Only one thread object,
THREAD1, and only one entry point, entry_point1(),
are used.  State transitions are implemented by
using Thread Arguments.  The Thread Arguments are
initialized in example_init().
In this example, Thread Arguments are passed as pointers
to a data structure.  Thread Arguments may also be passed
as scalar values, as demonstrated in example5.c.
 
example4.c
 
- 
This example application demonstrates three independent
state machines, each with three states.  The state
machines are started by the expiration of Alarm objects
SALARM1, SALARM2, and SALARM3.  The three state machines
are implemented via the thread objects THREAD1, THREAD2,
and THREAD3.  The three thread objects share one entry
point, entry_point1().  State transitions are implemented
by using Environment Arguments.  The Environment Arguments
are initialized in example_init().
The example also illustrates how multiple thread objects
can share a single resource: the UART.  THREAD1, THREAD2,
and THREAD3 have all been configured to run at LEVEL1 via
RTXCgen.  Since threads within one level can not preempt
each other, the string of characters that one thread sends
to the UART is not randomly mixed with characters output
by another thread.
 
example5.c
 
- 
This example application demonstrates a state machine
with three states.  Two thread objects, THREAD1 and
THREAD2, are used.  SALARM3 peridocially schedules
THREAD1 to run.  In entry_point1(), THREAD1 schedules
THREAD2 to run via TS_ORThreadGateBits().  In
entry_point2(), THREAD2 determines the state machine's
state via its Thread Gate value.
State transitions are implemented via TS_DefThreadArg().
In this example, the Thread Arguments are passed as scalar
values.  This is in contrast to example3.c, which passes
Thread Arguments as a pointer to a data structure.
 
OpenTCP Example Application
 
- 
An example application using the RTXC Quadros Single Stack LITE RTOS
with the OpenTCP TCP/IP stack has been included for the
M523xBCC and M5282LITE kits.  Unlike the others, these example
applications are located under the Quadros\Examples\Quadros_ss+OpenTCP
directory tree.  When running this example application,
the target will respond to ping (ICMP) and HTTP requests.