winIDEA SDK
Loading...
Searching...
No Matches
test_set_hwbp.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_setHWBP():
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 "mainLoopCounter",
21 42) # compare value
22 print("Hardware access BP set at 'mainLoopCounter', monitoring all addesses (via symbol name).")
23
24 bpCtrl.setHWBP(ic.IConnectDebug.bHW_accRD,
25 ic.IConnectDebug.bHW_SizeDefault,
26 ic.IConnectDebug.bHW_DataLSB0,
27 0, # main memory space
28 0x20000400,
29 56) # compare value
30 print("Hardware access BP set at 'g_baseStruct.i_base', monitoring specific addesses.")
31
32
33if __name__ == "__main__":
34 test_setHWBP()