winIDEA SDK
test_run_until_return.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2# (c) TASKING Germany GmbH, 2023
3#
4# In this Python example, you connect to the winIDEA instance,
5# create an execution controller, reset the CPU, and go to the function 'get_random'.
6# The CPU is then run until the end of the function and a message is printed.
7# At the end, the test_runUntilReturn() function is called.
8
9import isystem.connect as ic
10
11
12winidea_id = ''
13
14
15def test_runUntilReturn():
16 connMgr = ic.ConnectionMgr()
17 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
18
19 execCtrl = ic.CExecutionController(connMgr)
20 execCtrl.reset()
21
22 print("Running CPU until the end of the function 'targetInit'...")
23 execCtrl.runUntilReturn(0, True)
24
25
26if __name__ == "__main__":
27 test_runUntilReturn()