程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python interacts with T32 through TCP

編輯:Python

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)')


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved