1 |
30 |
unneback |
This directory contains various support software for using RTEMS on
|
2 |
|
|
the TS-1325. Descriptions follow.
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
DOS Loader
|
6 |
|
|
==========
|
7 |
|
|
|
8 |
|
|
The dos_sup directory contains a DOS-based loader (loader.com) for
|
9 |
|
|
RTEMS executables on the TS-1325. Fully commented source code is
|
10 |
|
|
included.
|
11 |
|
|
|
12 |
|
|
Once an application has been compiled and the resulting ELF format
|
13 |
|
|
executable converted to raw binary format and transferred to the
|
14 |
|
|
TS-1325, the DOS loader program must be used to load and execute
|
15 |
|
|
it. The loader is simply invoked as "loader filename", where the
|
16 |
|
|
filename cannot contain an explicit path.
|
17 |
|
|
|
18 |
|
|
The loader will work with files stored either on the C: ram disk or
|
19 |
|
|
the A: flash disk. Since Zmodem transfers to the C: ram disk are much
|
20 |
|
|
faster than to the A: disk, most development work will be done using
|
21 |
|
|
the C: disk. Once completed, an application may copied to the
|
22 |
|
|
(non-volatile) A: disk. Additionally, one may add the line "loader
|
23 |
|
|
filename" to the AUTOEXEC.BAT file, allowing the application to be
|
24 |
|
|
run automatically at boot time.
|
25 |
|
|
|
26 |
|
|
Note that the DOS loader will abort and exit if it detects that the
|
27 |
|
|
push-button switch is pressed, thus allowing one to break out of a
|
28 |
|
|
pathological "boot loop" situation i.e. abort an automatic load from
|
29 |
|
|
the AUTOEXEC.BAT file.
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
elf2exe
|
33 |
|
|
========
|
34 |
|
|
|
35 |
|
|
The elf2exe script is just a convenient wrapper for the objcopy
|
36 |
|
|
command. It can convert a list of RTEMS-generated ELF files to raw
|
37 |
|
|
binary images that can be loaded on the TS-1325. The converted files
|
38 |
|
|
are saved in the current directory with a ".exe" extension.
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
TS-1325 Ada95 Support
|
42 |
|
|
=====================
|
43 |
|
|
|
44 |
|
|
The TS-1325 includes a few peripherals which are very useful for
|
45 |
|
|
embedded development: a push-button switch, an LED, and a parallel
|
46 |
|
|
port which may be used for digital I/O. Note that the pin-out for the
|
47 |
|
|
parallel port is given in the TS-1325 manual.
|
48 |
|
|
|
49 |
|
|
These devices are all supported by Ada packages allowing easy access;
|
50 |
|
|
they may be found in the ts_1325_ada directory. Doing a make command
|
51 |
|
|
here will build a program that tests and exercises all these support
|
52 |
|
|
packages. Plugging in some kind of parallel-port "loop-back" connector
|
53 |
|
|
would be useful during this test.
|
54 |
|
|
|
55 |
|
|
Brief descriptions of the main packages are as follows:
|
56 |
|
|
|
57 |
|
|
* ts1325-button: allows one to check or wait for a button press.
|
58 |
|
|
|
59 |
|
|
* ts1325-led: allows safe reading and setting of the LED colour.
|
60 |
|
|
|
61 |
|
|
* ts1325-parallel: used to read and write byte date to the parallel
|
62 |
|
|
port.
|
63 |
|
|
|
64 |
|
|
* i386_ports: code to access the I/O address space, using Ada
|
65 |
|
|
inline assembly.
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
Serial Debugging Support
|
69 |
|
|
========================
|
70 |
|
|
|
71 |
|
|
RTEMS supports an Ada95 and RTEMS aware version of the GNU gdb
|
72 |
|
|
debugger, which can be configured to debug targets over a serial
|
73 |
|
|
line.
|
74 |
|
|
|
75 |
|
|
The port COM2 on the TS-1325 is normally used for console I/O, leaving
|
76 |
|
|
COM1 for use by gdb; an appropriate cable should be connected from the
|
77 |
|
|
development host to the TS-1325's COM1. The serial port used on the host
|
78 |
|
|
should match the line "target remote /dev/tty??" in the "cmds" file.
|
79 |
|
|
|
80 |
|
|
Sample C and Ada95 applications showing how to add debugging support
|
81 |
|
|
are given in the debug_c and debug_ada sub-directories. Once the
|
82 |
|
|
debugging-enabled executable is running on the TS-1325, gdb must be
|
83 |
|
|
started on the Linux host, taking as argument the RTEMS ELF executable.
|
84 |
|
|
|
85 |
|
|
Using a graphical front end to gdb such as the program ddd is highly
|
86 |
|
|
recommended. The script ddd-rtems shows how to invoke gdb using ddd as
|
87 |
|
|
a front end.
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
Ada95 Networking Support
|
91 |
|
|
========================
|
92 |
|
|
|
93 |
|
|
The sub-directory network_ada contains code and examples for an Ada95
|
94 |
|
|
binding to BSD network sockets. The code is based on Samuel Tardieu's
|
95 |
|
|
adasockets-0.1.3 package, but has been modified to work under RTEMS.
|
96 |
|
|
|
97 |
|
|
The binding itself is in the adasockets sub-directory. Edit the
|
98 |
|
|
Makefile to reflect your choice of installation directory, then type
|
99 |
|
|
the command "make install" to compile and install the binding. The
|
100 |
|
|
file networkconfig.h should also be edited according to the RTEMS
|
101 |
|
|
networking document.
|
102 |
|
|
|
103 |
|
|
The directories listener and tcprelay contain networking examples that
|
104 |
|
|
use the binding. The listener application simply accepts connections
|
105 |
|
|
on a certain port and echoes back any received data. The tcprelay
|
106 |
|
|
program accepts connections on a port and then relays all subsequent
|
107 |
|
|
data to and from another remote host. The makefiles in both
|
108 |
|
|
directories should be edited to reflect the installation point of the
|
109 |
|
|
adasockets binding.
|
110 |
|
|
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
Tony Ambardar, 8/8/99
|