You copied the Doc URL to your clipboard.

Annotate macros

Streamline provides a variety of macros to mark up your code, whether you want color markup, macros that include channel information, or macros that insert automatic bookmarks in the Timeline view.

Insert the following macros in your source code to enable Streamline Annotate:


You must add the file streamline_annotate.h, located in <DS-5_install_directory>/arm/gator/annotate/, to your list of includes to use these macros.


ANNOTATE_SETUP Call this macro before any other annotate macros to set up annotation.


When you annotate from within the kernel or a module, you do not need to use ANNOTATE_DEFINE and ANNOTATE_SETUP. Kernel annotations are not supported in interrupt context.


Like ANNOTATE_SETUP, you must insert a single instance of ANNOTATE_DEFINE in your code for annotation to work. Unlike ANNOTATE_SETUP, it does not matter where ANNOTATE_DEFINE is called.


Adds a string annotation. Because the ANNOTATE macro does not define a specific channel, the annotation is added to channel 0 by default.
ANNOTATE_COLOR(color, string) Works in the same way as the basic ANNOTATE macro, except use the color parameter to define an interface display color for the annotation string.
ANNOTATE_END() Terminates the annotation. Because the ANNOTATE_END macro does not define a specific channel, it defaults to channel 0.
ANNOTATE_CHANNEL(channel, string) Adds a string annotation to a channel defined by the numeric identifier passed in the channel parameter.


Annotation channels and groups are used to organize annotations within the threads shown in the processes section of the Timeline view. Each annotation channel appears on its own line under the thread. Channels may also be sorted by groups and displayed under a group name that you define using the ANNOTATE_NAME_GROUP macro.
ANNOTATE_CHANNEL_COLOR(channel, color, string) Defines an annotation string, gives it a color for display in the interface, and assigns it to a channel by passing a channel identifier in the channel parameter.
ANNOTATE_NAME_CHANNEL(channel, group, string) Names a channel and attaches it to a group. Specify a number in the channel parameter, the identifier of a valid group in group, and your own channel title in the string parameter.
ANNOTATE_CHANNEL_END(channel) Terminates the annotation for the given channel.
ANNOTATE_NAME_GROUP(group, string) Gives an annotation group a title. Specify a group identifier in the group parameter and a name for the group in the string parameter.
ANNOTATE_MARKER() Adds a red bookmark without a title to the Timeline view. It has no parameters.
ANNOTATE_MARKER_STR(string) Adds a marker with a title to the Timeline view. Pass a string as a parameter and the Timeline view displays it when you hover over the bookmark.
ANNOTATE_MARKER_COLOR(color) Adds a bookmark and assigns it a color. Pass a color as a parameter to automatically assign it to the bookmark.
ANNOTATE_MARKER_COLOR_STR(color, string) Creates a bookmark with a title and a color. Set the color and the title string using the function parameters and the created bookmark appears in the Timeline view with the defined properties.
ANNOTATE_VISUAL(data, length, str) Records an annotation that includes an image in one of the following formats:
  • GIF.
  • PNG.
  • JPEG.
  • TIFF.
  • ICO.
  • BMP +RLE.
Specify the image in data, the amount of data being written to the annotate file in length, and optionally a descriptive string to be included with the image in str.
ANNOTATE_DELTA_COUNTER(id, title, name) Defines a custom delta counter. Specify an integer in id to uniquely identify the counter, and a string for the chart title in title and for the series name in name. Use this macro in user space code only.
ANNOTATE_ABSOLUTE_COUNTER(id, title, name) Defines a custom absolute counter. The parameters have the same meanings as for ANNOTATE_DELTA_COUNTER. Use this macro in user space code only.
ANNOTATE_COUNTER_VALUE(id, value) Emits a value for a custom delta or absolute counter. Identify the counter using id and specify the integer value using value. Use this macro in user space code only.


You can locate all of the files provided by DS-5 Debugger by selecting Help > ARM® Extras... from the main menu. See streamline_annotate.h located in <DS-5_install_directory>/arm/gator/annotate/ for a better understanding of how to call each annotate macro.
Was this page helpful? Yes No