Texas Instruments TMS320 User Manual page 196

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

System Services
5.2.2
Handling Errors
Example 5-13. DSP/BIOS Error Handling
Example 5-14. Using doError to Print Error Information
5-14
SYS_error is used to handle DSP/BIOS error conditions as shown in
Example 5-13. Application programs as well as internal functions use
SYS_error to handle program errors.
Void SYS_error(s, errno, ...)
String
s;
Uns
errno;
SYS_error uses whatever function is bound to the Error function property to
handle error conditions. The default error function in the configuration
template is _UTL_doError, which logs an error message. In Example 5-14,
Error function can be configured to use doError which uses LOG_error to
print the error number and associated error string.
Void doError(String s, Int errno, va_list ap)
{
LOG_error("SYS_error called: error id = 0x%x", errno);
LOG_error("SYS_error called: string = '%s'", s);
}
The errno parameter to SYS_error can be a DSP/BIOS error (for example,
SYS_EALLOC) or a user error (errno >= 256). See TMS320 DSP/BIOS API
Reference Guide for your platform for a table of error codes and strings.
Note:
Error checking that would increase memory and CPU requirements has
been kept to a minimum in the DSP/BIOS APIs. Instead, the API reference
documentation specifies constraints for calling DSP/BIOS API functions. It
is the responsibility of the application developer to meet these constraints.

Advertisement

Table of Contents
loading

Table of Contents