ChipFind - документация

Электронный компонент: ST20-SWCSUN

Скачать:  PDF   ZIP
The information in this datasheet is subject to change
42 1669 01
December 1995
1/21
ST20 TOOLSET
ST20SWC
ST20 software development and debugging tools
PRODUCT INFORMATION
Inquest
File
Execution E vents Variables
O ptions W indow H elp
Program : C :\INQUEST\EXAMPLES\APP_C\APP .BTL
C:\INQUEST\EXAMPLES\APP_C\control.c
30
31
32
33
34
35
36
37
38
do
{
printf("Please type n : ");
} while (scanf("%d", &n) !=1);
return (n);
}
void close_down (Channel *in, Channel *o
Continue
Interrupt
Step
Next
Step Out
Step T o
Break
Watch
Delete
Print
Jump
Print *
Locate
Last Evt
FEATURES
ANSI C compiler (X3.159-1989).
Excellent compile time diagnostics.
Global and local optimization.
Assembler inserts and stand alone assembler.
Support for EPROM programming.
Support for placing code and data in user specified
memory locations.
Support for dynamically loading programs and
functions.
Small runtime overhead.
Cross-development from PC and Sun-4 platforms.
Support for trap and interrupt handlers.
INQUEST Interactive and post-mortem debugging:
Windowing interface using X Windows or Windows.
Programmable command language.
Source code or assembly code view.
Stack trace-back facility.
Variable and Memory display facility.
C expression interpreter.
INQUEST Interactive debugging:
Process and thread break points.
Single stepping of threads.
Read/Write/Access watch point capability.
Facilities to interrupt and find threads.
Performance analysis tools:
Analysis of time spent in each function.
Analysis of block execution frequency.
Analysis of processor idle time.
Analysis of processor utilization.
DESCRIPTION
The ST20 ANSI C Toolset provides a complete high
quality software development environment for the ST20
microcontroller and microprocessor. The compiler
supports the full ANSI C language definition and
includes both local and global optimizing features.
Embedded application support is provided by both
configuration and symbol map utilities.
An
interactive windowing debugger provides single
stepping, breakpoints, watchpoints and many other
features for debugging sequential and multi-tasking
programs.
Execution profilers give various post-mortem
statistical analyses of the execution of a program.
Inquest - Browser
app main : running
app control: stopped at #8001130d
app sum: chan-waiting
FAreg: 0.000000 FBreg: 0.000000 FCreg: 0.000000
Processes
app feed: chan-waiting
Inquest - Cmdline
3 2 >
3 1 app main : breakpoint 6 at <app.c 26 0>
0 0 > continue
0 0 > interrupt
3 2 app control : interrupted at #8001130d
ST20SWC
2/21
Contents
1
Introduction
3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1
Applications
3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
Code building tools
4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1
How programs are built
4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
ANSI C compilation system
5
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3
Support for embedded applications
6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
INQUEST windowing debugger
9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1
Interactive debugging
12
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2
Post-mortem debugging
13
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
Execution analysis tools
14
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1
Execution profiler
14
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2
Utilization monitor
15
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3
Test coverage and block profiling tool
15
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
Host interface and AServer
18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1
The application loader
irun
18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2
AServer
18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3
AServer features
19
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
ST20 Toolset product components
20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1
Documentation
20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2
Software Tools
20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3
Software libraries
20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4
Operating requirements
20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.5
Distribution media
21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
Support
21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
Ordering Information
21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ST20SWC
3/21
1
Introduction
The ST20 ANSI C Toolset provides a complete high quality software development environment for
the ST20 microprocessor. The compiler supports the full ANSI C language definition and includes
both local and global optimizing features. The run-time library includes both standard C functions,
supported by host target connections, and ST20 specific functions to facilitate real-time, multi-tasking
and embedded control operations. The real-time and multi-tasking support uses the on-chip hard-
ware micro-kernel and timers, so for many applications no operating system or real-time kernel
software is needed.
An interactive windowing debugger provides single stepping, breakpoints, watchpoints and many
other features for debugging sequential and multi-tasking programs running on an ST20. Execution
analysis tools give post-mortem statistical analyses including execution profiles, processor utiliza-
tion, test coverage and block profiles.
The host interface is provided by the AServer. This can be used simply as an application loader and
host file server, invoked by the
irun
command. The INQUEST tools have their own commands which
in turn load
irun
in order to load the application. The AServer may also be used to customize the
host interface if required.
1.1
Applications
Single- and multi-tasking;
Embedded systems;
Real-time applications;
Low cost single chip applications;
Low level device control applications;
Porting of existing software and packages.
ST20SWC
4/21
2
Code building tools
The ST20 ANSI C Toolset provides a complete C cross-development system for the ST20. It can be
used to build single task and multi-tasking programs for the ST20. Programs developed with the
toolset are both source and binary compatible across all host development machines.
The ST20 ANSI C Toolset is available for the following development platforms:
IBM 386/486 PC and compatibles under MSDOS 5 and Windows 3.1, or later versions.
Sun 4 under SunOS 4.1.3 or Solaris 2.4 with X11 Release 4 server or OpenWindows 3, or
later versions.
2.1
How programs are built
The toolset build process is shown diagrammatically in Figure 1.
Figure 1
The tool chain
ANSI C source files may be separately compiled into
object files. The compiler and libraries are
described in section 2.2. The
librarian may be used to collate object files into libraries. The linker links
object files and libraries into fully resolved linked units.
A
configuration description is a text file describing the target hardware and how the software maps
onto it. The
configurer converts the configuration description file into a configuration binary file. The
collector removes any debugging information, and uses the configuration binary to collect the linked
files with bootstrap code to make an executable file called a
bootable file.
During development and for hosted systems, the bootable file may be loaded down a hardware serial
link onto the target hardware using the
application loader. For stand-alone systems, the bootable file
may be converted, using the EPROM tool, to an industry standard EPROM format for programming
EPROMs.
In addition to loading programs down a hardware serial link, the application loader program provides
access to host operating system facilities through a remote procedure call mechanism. This method
is used to support the full ANSI C run-time library.
A memory configurer tool is supplied for describing a ST20450 memory configuration. This data is
used to initialize the memory interface of the ST20450. The memory interface can be initialized either
using the hardware serial link or from ROM.
ST20SWC
5/21
2.2
ANSI C compilation system
2.2.1
Compiler operation
The compiler operates from a host command line interface. The preprocessor is integrated into the
compiler for fast execution. The compile time diagnostics provided by the compiler are comprehen-
sive and include type checking in expressions and type checking of function arguments.
2.2.2
ANSI conformance
The ST20 ANSI C Toolset supports the full standard language as defined in X3.159-1989. The
compiler passes all the tests in the validation suites from Plum Hall and Perennial.
2.2.3
Local optimized code generation
The compiler implements a wide range of local code optimization techniques.
Constant folding. The compiler evaluates all integer and real constant expressions at compile
time.
Workspace allocation. Frequently used variables are placed at small offsets in workspace, thus
reducing the size of the instructions needed to access them, and hence increasing the speed
of execution.
Dead-code elimination. Code that cannot be reached during the execution of the program is
removed.
Peephole optimization. Code sequences are selected that are the fastest for the operation.
Constant caching. Some constants have their load time reduced by placing them in a constant
table.
Unnecessary jumps are eliminated.
Switch statements can generate a number of different code sequences to cover the dense
ranges within the total range.
Special idioms that are better on ST20s are chosen for some code sequences.
2.2.4
Globally optimized code generation
The ANSI C globally optimizing compiler extends the types of optimizations it performs to global
techniques. These have typically given a 1525 percent improvement in speed over the local opti-
mizations as measured by a suite of internal benchmarks.
Common sub-expression elimination removes the evaluation of an expression where it is
known that the value has already been computed; the value is stored in temporary local work-
space. This improves the speed of a program and reduces code size.
Loop-invariant code motion can move the position where an expression is evaluated from within
a loop to outside it. If the expression contains no variables that are changed during the execution
of a loop, then the expression can be evaluated just once before the loop is entered. By keeping
the result in a temporary, the speed of execution of the whole loop is increased.
Tail-call optimization reduces the number of calls and returns executed by a program. If the last
thing a function does is to invoke another function and immediately return the value there from,
then the compiler attempts to re-use the same workspace area by just jumping to (rather than
calling) the lower level function. The called function then returns directly to where the upper level
function was called from. In the case where the call is a recursive call to the same function, then
the workspace is exactly the right size, and a saving is also made because the stack adjustment
instructions are no longer needed either. This optimization saves speed and total stack space.