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 execCtrl.gotoFunction("get_random")
22
23 print("Running CPU until the end of the function 'get_random'...")
24 execCtrl.runUntilReturn(ic.CExecutionController.TOUT_1s, True)
25
26
27if __name__ == "__main__":
28 test_runUntilReturn()