User`s manual

Dynamic C Users Manual digi.com 105
xalloc_stats()
Prints a table of physical addresses that are available for allocation in xmem via xalloc() calls. To dis-
play this information in the Stdio window, execute the statement:
xalloc_stats(0);
in your application or use Inspect | Evaluate Expression. The Stdio window will display something similar
to the following:
A region is a contiguous piece of memory. Theoretically, up to four regions can exist; a region that is
marked “dummy” is a region that does not exist. Each region is identified as “normal” or “BB RAM,”
which refers to memory that is battery-backed.
SerialIO.exe
The utility serialIO.exe is located in \Diagnostics\Serial_IO. It is also in the file
SerialIO_1.zip, available for download at the Digi website. This utility is a specialized terminal
emulator program and comes with several diagnostic programs. The diagnostic programs test a variety of
functionality, and allow the user to simulate some of the behavior of the Dynamic C download process.
The utility has a Help button that gives complete instructions for its use. The Rabbit 3000 Designers
Handbook in the chapter titled “Troubleshooting Tips for New Rabbit-Based Systems” explains some of
the diagnostic programs that come with the serialIO utility. Understanding the information in this chapter
will allow you to write your own diagnostic programs for the serialIO utility.
reset_demo.c
The sample program Samples\reset_demo.c demonstrates using the functions that check the reason
for a reset: hard reset (power failure or pressing the reset button), soft reset (initiated by software), or a
watchdog timeout.
Error Logging
Chapter 8, “Run-Time Errors,” describes the exception handling routine for run-time errors that is supplied
with Dynamic C. The default handler may be replaced with a user-defined handler. Also error logging can
be enabled by setting ENABLE_ERROR_LOGGING to 1 in the BIOS (prior to Dynamic C version 9.30) or
in ERRLOGCONFIG.LIB (starting with DC 9.30). See Chapter 8 for more information.