9/11/95
Page 11
defined in one of the library helper files. The user may want to search for the symbols in the library
helper files to find the correct helpers to be included in the makefile. The Paradigm LOCATE
Reference Manual explains the functions of these files in detail.
The user should make use of the makefiles and configuration files in the
examples
sub-directories.
The
readme.txt
file in each directory explains the purpose and features of each example.
4.
Running the standard I/O program - stdio.c
An example program demonstrating the Paradigm Debug/RT’s ability to handle standard I/O is
distributed in the Paradigm LOCATE software. This example is located in the
c:\locate\msc80\examples\stdio
directory, and the name of the program is
stdio.c
. Building the
stdio.c program to run on the SD186EM board involves the following steps:
“cd” to the stdio directory (i.e.,
cd \locate\msc80\examples\stdio
).
Change the configuration file.
Change the value of the DEBUG variable in the makefile to 2.
Run
nmake
or
nmaker
.
There are two configuration files in the
stdio
directory, they are:
stdio.rm
, and
stdio.rt
.
Neither of
these files was customized for the SD186EM board; therefore, the memory mapping addresses and
segment addresses for the class CODE and DATA must be changed. The CODE and DATA sections
shown in Figure 7A should be big enough to handle stdio.c. Users should change the addresses of the
map
statements, and the segment addresses of the
class
statements of the selected configuration file to
be the same as the corresponding statements shown in Figure 8.
The makefiles in this and in most other example directories are designed to build different object files,
depending on the value of the DEBUG variable in the makefile. If the value of DEBUG=0, the
configuration file
stdio.rm
will be chosen to build the standalone version; if the value of DEBUG=1,
the configuration file
stdio.rm
will be chosen to build the emulator version; if the value of DEBUG=2,
the configuration file
stdio.rt
will be chosen to build the PDREM version. To build a PDREM version
of
stdio.c
, simply change the value of the DEBUG variable in the makefile to 2 (See Figure 9), then
run
nmake
(or
nmaker)
. When
nmake
finishes, it creates the absolute executable file
stdio.axe
.
From a DOS shell,
stdio.axe
can be downloaded
to the RAM area of the SD186EM board using the
pdrt186 stdio
command.
Figure 9 - Makefile to build a debuggable program
......
FARDATA = 0 # 0 - none, 1 - normal, 2 - compressed
DEBUG = 2 # 0 - none, 1 - debug EPROM, 2 - debug PDREMOTE
WARNINGS = 2 # 0 - none, 1 - min, 2 - medium, 3 - max
OPTIMIZE = 0 # 0 - none, 1 - size, 2 - speed
......