User`s manual

122 digi.com Run-Time Errors
8.3 Run-Time Error Logging
Error logging is available as a BIOS enhancement for storing run-time exception history. It can be useful
diagnosing problems in deployed Rabbit targets. To support error logging, the target must have battery-
backed RAM. The wide range of error logs available with RabbitSys obviates the need for the default error
logging described here.
8.3.1 Error Log Buffer
A circular buffer in extended RAM will be filled with the following information for each run-time error
that occurs:
The value of SEC_TIMER at the time of the error. This variable contains the number of seconds since
00:00:00 on January 1st 1980 if the real-time clock has been set correctly. This variable is updated by
the periodic timer which is enabled by default. Rabbit sets the real-time clock in the factory. When the
BIOS starts on boards with batteries, it initializes SEC_TIMER to the value in the real-time clock.
The address where the exception was called from. This can be traced to a particular function using the
MAP file generated when a Dynamic C program is compiled.
The exception type. Please see Table 8-2 on page 120 for a list of exception types.
The value of all registers. This includes alternate registers, SP and XPC. This is a global option that is
enabled by default.
An 8-byte message. This is a global option that is disabled by default. The default error handler does
nothing with this.
A user-definable length of stack dump. This is a global option that is enabled by default.
A one byte checksum of the entry.
The size of the error log buffer is determined by the number of entries, the size of an entry, and the header
information at the beginning of the buffer. The number of entries is determined by the macro
ERRLOG_NUM_ENTRIES (default is 78). The size of each entry is dependent on the settings of the global
options for stack dump, register dump and error message. The default size of the buffer is about 4K in
extended RAM.