metaonly module xdc.runtime.Reset

Startup reset function manager

This module defines an initial reset function and can be used without requiring any other xdc.runtime module. The reset function is called as early as possible in the application startup and is intended for platform-specific hardware initialization. [ more ... ]
Configuration settings sourced in xdc/runtime/Reset.xdc
var Reset = xdc.useModule('xdc.runtime.Reset');
module-wide config parameters
 
DETAILS
This module defines an initial reset function and can be used without requiring any other xdc.runtime module. The reset function is called as early as possible in the application startup and is intended for platform-specific hardware initialization.
The reset function sequentially calls each of the functions added to the fxns array starting from index 0. If Startup.resetFxn is defined, it is called before any of the functions defined by the fxns array.
By providing an array of startup functions, rather than a single function as Startup does, modules that need very early initialization can simply add their initialization to the list of functions to be called without having to implement a "chaining" mechanism or requiring the user to implement and maintain an application reset function.
WARNING
The reset function is _not_ supported on all platforms and, as a result, you should never place any "portable" code that is required for your application in this function. Use the Startup module to define required application startup functions.
SEE
 
config Reset.fxns  // module-wide

List of functions to call at reset

Configuration settings
Reset.fxns = Startup.InitFxn[] [ ];
 
DETAILS
This array defines the functions that will be executed by the reset initialization function (xdc_runtime_Startup_reset__I) _in addition to_ the function specified by Startup.resetFxn.
The following code fragment shows how to add the externally defined function myReset() to this array.
      var Reset = xdc.useModule("xdc.runtime.Reset");
      Reset.fxns[Reset.fxns.length++] = "&myReset";
WARNING
Although the functions specified in fxns[] are ordinary C functions, they are often called _before_ the C runtime is fully initialized; e.g., they may be called _before_ static variables are initialized. Reset functions should only assume that a minimal execution stack has initialized.
SEE
generated on Thu, 23 May 2019 00:24:46 GMT