2.4 Python examples

The following examples demonstrate the iris.debug Python module. They are located in $PVLIB_HOME/Iris/Python/Examples/.

For more information about iris.debug, see Iris Python Debug Scripting User Guide.


  • Before running these scripts, you must have added the directory that contains iris.debug to the PYTHONPATH environment variable.
  • When launching the model to connect to, use the -I option to start an Iris server.
  • Some of these examples load an application into the model. The application must be located in the directory from which the model was launched, in other words, the current working directory.

Table 2-3 Python examples

Example Description
  • Connects to a running model.
  • Prints the names of all target component instances.
  • Prints the CPU instance properties.
  • Loads an application (vectors.axf) into the model.
  • Sets register, program, and memory breakpoints.
  • Runs the model and prints information about the breakpoints that were hit.

Connects to the model, then runs, stops, and steps it.

  • Loads an application (endian.axf) into the model.
  • Writes data to memory then reads it back as bytes and words, to show the effect of changing endianness.
  • Prints all the parameters for the first CPU in the model.
  • Changes a run-time parameter and prints the new value.

Modifies registers in the CPU in the target model and prints the values before and after the changes.

  • Loads an application (demo.axf) into the model.
  • Steps through the program.
  • Modifies and prints some register values.
  • Loads an application (semihostconf.axf) into the model.
  • Handles semihosted I/O by printing the semihosting stderr and stdout of the CPU target to the console.
Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.