You copied the Doc URL to your clipboard.

Using the gator_events_mmapped.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_mmapped.c. This file is provided as an example of how to add custom counters to code that uses kernel space gator.

Incorporating the simulated examples from gator_events_mmapped.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 Help > ARM Extras... from the main menu.

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

Procedure

  1. Open the gator_events_mmapped.c sample file in the editor of your choice.
  2. Copy the XML from the comments section of gator_events_mmapped.c.
  3. Create a new XML file in the same directory as the gatord source code, and call it events-mmap.xml.
  4. Add the copied XML from the comments section of gator_events_mmapped.c to events-mmap.xml.
  5. Remove any * comment markers from the copied XML.
  6. Save events-mmap.xml.
  7. Rebuild gatord and copy it to the target.
  8. Kill the old gatord process if it is already running, then enter ./gatord & on the command line of your target to launch the newly built gatord.
  9. Open the Counter Configuration dialog using the button in the Streamline Data view.
    A new category, mmapped, 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 12-1 The Sine counter in the Timeline view

    The Sine counter in the Timeline view

Was this page helpful? Yes No