You copied the Doc URL to your clipboard.

Using the gator_events_mmaped.c custom counters example

In the gator-driver.tar.gz archive distributed with your copy of Streamline is a gator source file called gator_events_mmaped.c. This file was provided as an example of how to add custom counters. Incorporating the simulated examples from gator_events_mmaped.c into gator is a good way to familiarize yourself with the process of adding your own counters.

Note

You can locate all of the files provided by DS-5 by selecting HelpARM Extras... from the main menu.

To add a custom counter using gator_events_mmaped.c, follow these steps:

Procedure

  1. Open the gator_events_mmaped.c sample file in the editor of your choice.
  2. Copy the xml from the comments section of gator_events_mmaped.c.
  3. Open events.xml. This file is only available after you have built the gator daemon. If you built your gator daemon for a Linux target, it is located in the build_location/daemon-src directory. If you built it for Android, it is located in the build_location/jni directory.
  4. Add the copied xml from the comments section of gator_events_mmaped.c to events.xml, just after the closing tag of the Linux category.
  5. Remove any * comment markers from the copied xml.
  6. Save events.xml.
  7. Copy events.xml to your target. You must place it in the same directory as gatord.
  8. Enter ./gatord & on the command line of your target to restart gatord.
  9. Open the Counter Configuration dialog using the button in the Streamline Data view. A new category, mmaped, appears in the Counter Configuration dialog box with the Sine, Triangle, and PWM simulated counters.
  10. Add Sine to list of counters.
  11. Run a capture session. If successful, the waveform generated by the simulated Sine counter appears in the charts section of the Timeline view.

    Figure 13-1 The Sine counter in the Timeline view

    The Sine counter in the Timeline view

Was this page helpful? Yes No