5.5.7. EVS_Callbacks_Cortex-R4 example

The EVS_Callbacks_Cortex-R4 example, shown in Figure 5.9, demonstrates the use of the callbacks that are described in set_callbacks(). It is based on the DMA example (See DMA example for a description of the system). This example has two different execution modes, depending on whether the debug server is enabled or not.

Debug Server enabled

The size of the quantum is set to 10 simulation ticks and triggers the following callbacks:

  • start_of_quantum

  • proceed_quantum()

  • simulation_stop()

  • simulation_quit()

The simulation_quit() callback is triggered if the visualization unit is closed by pressing the close symbol (typically ‘X’ in the upper right corner, depending on your window manager). To properly reproduce the behavior it is recommended to attach a debugger to the debug server of the EVS and ‘instruction step’ through the code. See README.txt in the top level directory of the example for more detailed instructions and a description of the expected output.

Note

The -d option must be passed to the executable to start the debug server.

No Debug Server enabled

The following callbacks are triggered if the example is started without the debug server being enabled (default case)

  • start_of_quantum()

  • wait()

  • simulation_stop()

See README.txt in the top level directory of the example for more detailed instructions and a description of the expected output.

Building the EVS_Callbacks_Cortex-R4 example

See Building Example systems for how to build the example. Use EVS_Callbacks_Cortex-R4.sgproj as the name for the project file.

Running the EVS_Callbacks_Cortex-R4 example

See Running the Example system or Running the examples with debug support for more instructions on how to run the example system.

Copyright © 2007-2010 ARM Limited. All rights reserved.ARM DUI 0370K
Non-ConfidentialID110210