EasyManuals Logo

Texas Instruments TMS320 User Manual

Texas Instruments TMS320
288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #194 background imageLoading...
Page #194 background image
System Services
5-12
5.2 System Services
The SYS module provides a basic set of system services patterned after
similar functions normally found in the standard C run-time library. As a rule,
DSP/BIOS software modules use the services provided by SYS in lieu of
similar C library functions.
You can configure a function to be run whenever the program calls one of
these SYS functions. See the SYS reference section in the TMS320
DSP/BIOS API Reference Guide for your platform for details.
5.2.1 Halting Execution
SYS provides two functions as seen in Example 5-9 for halting program
execution: SYS_exit, which is used for orderly termination; and SYS_abort,
which is reserved for catastrophic situations. Since the actions that should be
performed when exiting or aborting programs are inherently system-
dependent, you can modify configuration settings to invoke your own routines
whenever SYS_exit or SYS_abort is called.
Example 5-9. Coding To Halt Program Execution with SYS_exit or SYS_abort
The functions in Example 5-9 terminate execution by calling whatever routine
is specified for the Exit function and Abort function properties of the SYS
module. The default exit function is UTL_halt. The default abort function is
_UTL_doAbort, which logs an error message and calls _halt. The _halt
function is defined in the boot.c file; it loops infinitely with all processor
interrupts disabled.
SYS_abort accepts a format string plus an optional set of data values
(presumably representing a diagnostic message), which it passes to the
function specified for the Abort function property of the SYS module as shown
in Example 5-10.
Void SYS_exit(status)
Int status;
Void SYS_abort(format, [arg,] ...)
String format;
Arg arg;

Table of Contents

Other manuals for Texas Instruments TMS320

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320 and is the answer not in the manual?

Texas Instruments TMS320 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320
CategoryComputer Hardware
LanguageEnglish

Related product manuals