2.2.5 Callback objects

This section describes the callback classes that the target connection mechanism of CADI uses.

CADIErrorCallback
CADIErrorCallback is primarily used to report errors from a simulation to the registered caller. This manages errors occurring during the target connection phase and during the simulation itself.
CADISimulationCallback
CADISimulationCallback is required for system-wide communication from a CADI simulation to the caller.
Callback methods of this class are of special importance for the CADI interface because they are required to guarantee a clean disconnection of a caller from a target or simulation and, if required, a clean shutdown of the simulation. A shutdown requires the simShutdown() and simKilled() methods:
  • simShutdown() indicates to a caller that the simulation is shutting down. That might be the result of a simulation being requested to shut down by an internal event or by another attached debugger receiving this callback.
    A caller must unregister all callback objects and release all obtained interface pointers acquired during target connection.
  • If it is not possible to cleanly disconnect and shut down the simulation, the simKilled() callback must be called. This tells the caller that the interface no longer exists because of, for example, a hardware failure or memory access error.
    After simKilled() is received, a caller must not access the corresponding simulation pointer or objects owned by the simulation.
Related reference
2.7 Disconnecting from a target
Non-ConfidentialPDF file icon PDF versionARM DUI0842F
Copyright © 2014, 2015 ARM. All rights reserved.