User`s guide
Instrumentation APIs
Instrumentation 3-9
❏ Fixed. The log stores the first messages it receives and stops accepting
messages when its message buffer is full. As a result, a fixed log stores
the first events that occur since the log was enabled.
❏ Circular. The log automatically overwrites earlier messages when its
buffer is full. As a result, a circular log stores the last events that occur.
You create LOG objects using the Configuration Tool with which you assign
properties such as the length and location of the message buffer.
You can specify the length of each message buffer in words. Individual
messages use four words of storage in the log’s buffer. The first word holds a
sequence number. The remaining three words of the message structure hold
event-dependent codes and data values supplied as parameters to
operations such as LOG_event, which appends new events to a LOG object.
As shown in Figure 3-2, LOG buffers are read from the target and stored in a
much larger buffer on the host. Records are marked empty as they are copied
up to the host.
Figure 3-2. LOG Buffer Sequence
LOG_printf uses the fourth word of the message structure for the offset or
address of the format string (for example, %d, %d). The host uses this format
string and the two remaining words to format the data for display. This
minimizes both the time and code space used on the target since the actual
printf operation (and the code to perform the operation) are handled on the
host.
LOG_event and LOG_printf both operate on logs with interrupts disabled.
This allows hardware interrupts and other threads of different priorities to
write to the same log without having to worry about synchronization.
HostTarget
LOG object
LOG buffer
read
&
clear










