6.5 Python examples

Python debug scripting examples.

These examples show how to use the fm.debug Python module to connect to targets, read the contents of caches, read/write memory and registers, set breakpoints, and perform run control. Some of these scripts use images that are supplied as assembly language source files.

Table 6-6 Python examples

Example Description
checkpointing.py

Saves or restores the state of a library model, or a specific component in it, using either the default checkpoint delegate, or an example of a custom delegate.

DemoBreakpoints.py

Enables exception breakpoints and sets program and memory breakpoints in an application running on a library model. Prints the breakpoints that were hit.

DemoCaches.py

Prints the contents of PVCache CADI targets that are selected by the user.

DemoDumpAllRegisters.py

Prints register names and values. You can specify a list of registers and targets, or if not, it prints all registers for all CPU targets.

DemoMemory.py

Writes to and reads from target memory, as bytes and words, to show the effect of toggling the endianness of the processor.

DemoParameters.py

Gets and sets instantiation time and run-time model parameters.

DemoRegisters.py

Reads and writes registers. Shows different ways of specifying register names.

DemoSemihosting.py

Binds semihosting stdin and stdout calls to the semihosting stdin and stdout of the target.

DemoStopOnStringOut.py

Stops the model when a string is entered in the UART terminal.

DemoTLB.py

Prints the contents of the TlbCadi CADI targets selected by the user.

DemoTraceOnBpt.py

Starts tracing a model from the address at which a breakpoint is hit. The GenericTrace plug-in must have been loaded on the model that it connects to.

For information about GenericTrace, see 5.8 GenericTrace.

LoadModel.py

Loads a library model that is specified as a parameter.

Non-ConfidentialPDF file icon PDF version100964_1180_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.