winIDEA SDK
Loading...
Searching...
No Matches
test_hot_attach_detach.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 performs a hot attach and detach. Hot Attach and Detach functionality allows you
# to attach (and detach) the BlueBox development system to a running target system without
# affecting its operation and have all debug functions available.
import isystem.connect as ic
winidea_id = ''
def test_hotAttachDetach():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
execCtrl = ic.CExecutionController(connMgr)
sess_ctrl = ic.CSessionCtrl(connMgr)
sess_ctrl.begin_prepare()
if execCtrl.hotDetach() == 0:
print(f"Hot detach succeeded, winIDEA is in `detached` state.")
if execCtrl.hotAttach() == 0:
print(f"Hot attach succeeded, winIDEA is connected.")
execCtrl.stop()
if __name__ == "__main__":
test_hotAttachDetach()