winIDEA SDK
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 "main_loop_counter",
21 42) # compare value
22 print("Hardware access BP set at 'main_loop_counter', 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 0x20000034, # for TC399 use 0xD0001108
29 # 0xD0001108,
30 56) # compare value
31 print("Hardware access BP set at 'g_baseStruct.i_base', monitoring specific addesses.")
32
33
34if __name__ == "__main__":
35 test_setHWBP()