1,T32 edition
View by Start a simulator, stay help Click on the About TRACE32, stay Software version You can see the version information in . What we use here is 2020.9 edition , because PYRCL Support for is starting with this version .
2, open API Port
3,python Construction of environment
python The operating environment is python3.6 above , Can be in python Download and install on the official website ,ide You can use the community version pycharm, It is also downloaded and installed on its official website . After installation, it is necessary to install lautbach's `lauterbach-trace-rcl` library , Can pass ide Install or pip install . After these steps , You can write python Code. .
import lauterbach.trace32.rcl as t32rc # initialization t32 controller t32rc.init(t32sys=r'C:/T32') # Generate connection object , Port number, i.e Port Value Corresponding 20004, Readers should fill in the form according to their own configuration . After the connection object is generated, you can write the required debug Code. dbg = t32rc.connect(port=20004, protocol='TCP') # Print OS Information print(dbg.fnc.os_name()) # Print T32 Version information print(dbg.fnc.software_version()) # Print register values to AREA dbg.cmd('print data.long(EAXI:0x10000)')