EasyManua.ls Logo

ARM DS-5 - Page 99

Default Icon
123 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Advanced Customizations
ARM DUI 0482K Copyright © 2010-2012 ARM. All rights reserved. 11-5
ID120712 Non-Confidential
Figure 11-1 The Sine counter in the Timeline view
11.2.2 Creating your own counters
To create your own counters, mimic the methods used in the
gator_events_mmaped.c
or any of
the other
gator_events_x
files included with the gator source.
Make sure to do the following to ensure that gatord interacts with your custom source:
1. Create an empty
gator_events_your_custom.c
file or duplicate
gator_events_mmaped.c
.
2. Update the
makefile
to build the new
gator_events_your_custom.c
file.
3. Add the preprocessor directive
#include "gator.h"
if you do not use
gator_events_mmaped.c
as a template.
4. Include the
gator_events_init
macro.
5. Implement the following functions in your new source file:
gator_events_your_custom_init
,
gator_events_your_custom_interface
,
gator_events_your_custom_create_files
,
gator_events_your_custom_start
,
gator_events_your_custom_read
, and
gator_events_your_custom_stop
.
6. All of your new counters must be added to the events list. You can accomplish this in one
of two ways:
Add the list to the
events.sml
file, located in the same directory as
gatord
.
Create a new xml file in the same directory as the makefile before building
gatord
.
The makefile pulls in any file that begins with
events-
so create a xml file called
events-YourCustom.xml
. Re-build
gatord
after you create this new xml file.

Table of Contents

Related product manuals