module ti.sysbios.smp.SysMin

Minimal implementation of xdc.runtime.ISystemSupport

This implementation provides a fully functional implementation of all methods specified by ISystemSupport. [ more ... ]
C synopsis target-domain sourced in ti/sysbios/smp/SysMin.xdc
DETAILS
This implementation provides a fully functional implementation of all methods specified by ISystemSupport.
The module maintains an internal buffer (with a configurable size) that stores on the "output". When full, the data is over-written. When System_flush() is called the characters in the internal buffer are "output" using the user configuratble outputFxn.
As with all ISystemSupport modules, this module is the back-end for the xdc.runtime.System module; application code does not directly call these functions.
 
typedef SysMin_OutputFxn

Output characters in the specified buffer

C synopsis target-domain
typedef Void (*SysMin_OutputFxn)(Char*,UInt);
 
DETAILS
The first parameter is a pointer to a buffer of characters to be output. The second parameter is the number of characters in the buffer to output.
This function may be called with 0 as the second parameter. In this case, the function should simply return.
 
config SysMin_bufSize  // module-wide

Size (in MAUs) of the output

C synopsis target-domain
extern const SizeT SysMin_bufSize;
 
DETAILS
An internal buffer of this size is allocated. All output is stored in this internal buffer.
If 0 is specified for the size, no buffer is created.
 
config SysMin_flushAtExit  // module-wide

Flush the internal buffer during exit or abort

C synopsis target-domain
extern const Bool SysMin_flushAtExit;
 
DETAILS
If the application's target is a TI target, the internal buffer is flushed via the HOSTwrite function in the TI C Run Time Support (RTS) library.
If the application's target is not a TI target, the internal buffer is flushed to stdout via fwrite(..., stdout).
Setting this parameter to false reduces the footprint of the application at the expense of not getting output when the application ends via a System_exit(), System_abort(), exit() or abort().
 
config SysMin_outputFxn  // module-wide

User suplied character output function

C synopsis target-domain
extern const SysMin_OutputFxn SysMin_outputFxn;
 
DETAILS
If this parameter is set to a non-null value, the specified function will be called by to output characters buffered within SysMin.
For example, if you define a function named myOutputFxn, the following configuration fragment will cause SysMin to call myOutputFxn whenever the character buffer is flushed.
      var SysMin = xdc.useModule("xdc.runtime.SysMin");
      SysMin.outputFxn = "&myOutputFxn";
If this parameter is not set, a default function will be used which uses the ANSI C Standard Library function fwrite() (or HOSTwrite in the TI C Run Time Support library) to output accumulated output characters.
SEE
 
SysMin_abort()  // module-wide

Backend for xdc.runtime.System.abort()

C synopsis target-domain
Void SysMin_abort(CString str);
 
ARGUMENTS
str — message to output just prior to aborting
If non-NULL, this string should be output just prior to terminating.
message to output just prior to aborting
If non-NULL, this string should be output just prior to terminating.
DETAILS
This function is called by System.abort() prior to calling the ANSI C Standard library function abort(). So, to ensure the abort processing of the system's ANSI C Standard library completes, this function should return to its caller.
This abort function writes the string to the internal output buffer and then gives all internal output to the outputFxn function if the flushAtExit configuration parameter is true.
SEE
 
SysMin_exit()  // module-wide

Backend for xdc.runtime.System.exit()

C synopsis target-domain
Void SysMin_exit(Int stat);
 
ARGUMENTS
stat — status value passed to all "atexit" handlers
This value is passed to all "atexit" handles bound via System.atexit().
DETAILS
This function is called as part the normal "atexit" processing performed by the ANSI C Standard Library's exit() function; System.exit() directly calls ANSI exit().
This function is called after all "atexit" handlers bound via System.atexit() are run and it is always called while "inside" the the System gate.
To ensure that all exit processing of the system's ANSI C Standard Library completes, this function should return to its caller. Exit handlers bound using the ANSI C Standard Library atexit() function may run before or after this function.
This exit function gives all internal output to the outputFxn function if the flushAtExit configuration parameter is true.
SEE
 
SysMin_flush()  // module-wide

Backend for xdc.runtime.System.flush()

C synopsis target-domain
Void SysMin_flush();
 
DETAILS
This function is simply called by System_flush to output any characters buffered by the underlying SystemSupport module to an output device.
The flush writes the contents of the internal character buffer via the outputFxn function.
WARNING
The xdc.runtime.System gate is used for thread safety during the entire flush operation, so care must be taken when flushing with this ISystemSupport module. Depending on the nature of the System gate, your application's interrupt latency may become a function of the bufSize parameter!
SEE
 
SysMin_putch()  // module-wide

Backend for xdc.runtime.System.printf() and System.putch()

C synopsis target-domain
Void SysMin_putch(Char ch);
 
ARGUMENTS
ch — character to output
DETAILS
Output a single character. This function is called by System_printf() to write each character of formated output specified by its arguments.
Places the character into an internal buffer. The flush sends the internal buffer to the outputFxn function. The internal buffer is also sent to the SysMin_outputFxn function by exit and abort if the flushAtExit configuration parameter is true.
SEE
 
SysMin_ready()  // module-wide

Test if character output can proceed

C synopsis target-domain
Bool SysMin_ready();
 
DETAILS
This function is called by System prior to performing any character output. If this function returns FALSE, the System functions that would normally call putch() simply return (with an appropriate error status) without ever calling putch.
This function returns true if the internal buffer is non-zero.
SEE
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId SysMin_Module_id();
// Get this module's unique id
 
Bool SysMin_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle SysMin_Module_heap();
// The heap from which this module allocates memory
 
Bool SysMin_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 SysMin_Module_getMask();
// Returns the diagnostics mask for this module
 
Void SysMin_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
Configuration settings sourced in ti/sysbios/smp/SysMin.xdc
var SysMin = xdc.useModule('ti.sysbios.smp.SysMin');
module-wide constants & types
    var obj = new SysMin.BufferEntryView// ;
        obj.entry = String  ...
 
    var obj = new SysMin.ModuleView// ;
        obj.outBuf = Ptr  ...
        obj.outBufIndex = UInt  ...
        obj.wrapped = Bool  ...
module-wide config parameters
 
 
 
metaonly struct SysMin.BufferEntryView
Configuration settings
var obj = new SysMin.BufferEntryView;
 
    obj.entry = String  ...
 
 
metaonly struct SysMin.ModuleView
Configuration settings
var obj = new SysMin.ModuleView;
 
    obj.outBuf = Ptr  ...
    obj.outBufIndex = UInt  ...
    obj.wrapped = Bool  ...
 
 
config SysMin.bufSize  // module-wide

Size (in MAUs) of the output

Configuration settings
SysMin.bufSize = SizeT 1024;
 
DETAILS
An internal buffer of this size is allocated. All output is stored in this internal buffer.
If 0 is specified for the size, no buffer is created.
C SYNOPSIS
 
config SysMin.flushAtExit  // module-wide

Flush the internal buffer during exit or abort

Configuration settings
SysMin.flushAtExit = Bool true;
 
DETAILS
If the application's target is a TI target, the internal buffer is flushed via the HOSTwrite function in the TI C Run Time Support (RTS) library.
If the application's target is not a TI target, the internal buffer is flushed to stdout via fwrite(..., stdout).
Setting this parameter to false reduces the footprint of the application at the expense of not getting output when the application ends via a System_exit(), System_abort(), exit() or abort().
C SYNOPSIS
 
config SysMin.outputFxn  // module-wide

User suplied character output function

Configuration settings
SysMin.outputFxn = Void(*)(Char*,UInt) null;
 
DETAILS
If this parameter is set to a non-null value, the specified function will be called by to output characters buffered within SysMin.
For example, if you define a function named myOutputFxn, the following configuration fragment will cause SysMin to call myOutputFxn whenever the character buffer is flushed.
      var SysMin = xdc.useModule("xdc.runtime.SysMin");
      SysMin.outputFxn = "&myOutputFxn";
If this parameter is not set, a default function will be used which uses the ANSI C Standard Library function fwrite() (or HOSTwrite in the TI C Run Time Support library) to output accumulated output characters.
SEE
C SYNOPSIS
 
metaonly config SysMin.common$  // module-wide

Common module configuration parameters

Configuration settings
SysMin.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
 
metaonly config SysMin.sectionName  // module-wide

Section where the internal character output buffer is placed

Configuration settings
SysMin.sectionName = String null;
 
DETAILS
The default is to have no explicit placement; i.e., the linker is free to place it anywhere in the memory map.
generated on Thu, 23 May 2019 00:23:06 GMT