10.6 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 .../gator/annotate/, to your list of includes to use these macros.


ANNOTATE_SETUP() Call this macro before any other annotate macros to setup 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.


This functions adds a string annotation. Because the ANNOTATE macro does not define a specific channel, the annotation is added to channel 0 by default.
ANNOTATE_CHANNEL(channel, string) Adds a string annotation to a channel defined by the numeric identifier passed to the channel variable.


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_COLOR(color, string) Works the in the same way as the basic ANNOTATE macro, only use the color variable to define an interface display color for the annotation string.
ANNOTATE_CHANNEL_COLOR(channel, color, string) Use this macro to define an annotation string, give it an color for display in the interface, and assign it to a channel by passing a channel identifier to the channel variable.
ANNOTATE_END() This command terminates the annotation.
ANNOTATE_CHANNEL_END(channel) Terminates the annotation for the given channel.
ANNOTATE_NAME_CHANNEL(channel, group, string) Use this command to name a channel and attach it to a group. Enter a number for the channel variable, the identifier of a valid group for group, and your own channel title for the string variable.
ANNOTATE_NAME_GROUP(group, string) Use this command to give an annotation group a title. Pass a group identifier to the group variable and a name for the group to the string variable.
ANNOTATE_MARKER() Use this function to add a red bookmark to the Timeline view without a title. It has no parameters.
ANNOTATE_MARKER_STR(...) This function adds a marker to the Timeline view with a title. Pass a string as a parameter to ANNOTATE_MARKER_STR(...) and the Timeline view displays it when you hover over the bookmark.
ANNOTATE_MARKER_COLOR(setColor) This functions adds a bookmark and assigns it a color. Pass a color through as a parameter to automatically assign it to the bookmark.
ANNOTATE_MARKER_COLOR_STR(setColor, ...) This function 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) Insert in your code to record an annotation that includes an image in one of the following formats: GIF, PNG, JPEG, TIFF, ICO, and BMP +RLE. Replace data with your image, length with the size of the data being written to the annotate file, and str with a descriptive string to be included with the image. Including a string is optional.


You can locate all of the files provided by DS-5 by selecting Help > ARM Extras... from the main menu. See the streamline_annotate.h located here for a better understanding of how to call each annotate macro.
Related concepts
Annotate overview
Kernel annotation
Related tasks
Adding Streamline Annotate to your code
Importing the Streamline_annotate example
Importing the Streamline_annotate example
Non-ConfidentialPDF file icon PDF versionARM DUI0482M
Copyright © 2010-2013 ARM. All rights reserved.