winIDEA SDK
test_set_hw_enabled.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_setHWEnabled():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 bpCtrl = ic.CBreakpointController(connMgr)
16 bpCtrl.setHWBP(ic.IConnectDebug.bHW_accRD,
17 ic.IConnectDebug.bHW_SizeDefault,
18 ic.IConnectDebug.bHW_DataLSB0,
19 True, # monitor all addresses of the symbol
20 "main_loop_counter",
21 42) # compare value
22 bpCtrl.setHWEnabled(False, "main_loop_counter")
23 print("HW BP at variable 'main_loop_counter' disabled.")
24
25 bpCtrl.setHWEnabled(True, "main_loop_counter")
26 print("HW BP at variable 'main_loop_counter' enabled.")
27
28
29if __name__ == "__main__":
30 test_setHWEnabled()