winIDEA SDK
Loading...
Searching...
No Matches
test_run_until_address.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
# (c) TASKING Germany GmbH, 2023
#
# This Python example gets the address of the main() function and resets
# the CPU before running it until the main() address.
# Finally, it calls the test_runUntilAddress() function.
import isystem.connect as ic
winidea_id = ''
def test_runUntilAddress():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
execCtrl = ic.CExecutionController(connMgr)
addCtrl = ic.CAddressController(connMgr)
mainAddress = addCtrl.getFunctionAddress("main").getAddress()
execCtrl.reset()
print(f"Running CPU to address {hex(mainAddress)} (function 'main') with 1 sec timeout...")
execCtrl.runUntilAddress(0, mainAddress)
if __name__ == "__main__":
test_runUntilAddress()