1
2
3
4
5import isystem.connect as ic
6
7
8winidea_id = ''
9
10
11def test_configureStackUsage():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15
16 addrCtrl = ic.CAddressController(connMgr)
17 cfgCtrl = ic.CConfigurationController(connMgr)
18 dataCtrl = ic.CDataController(connMgr)
19
20
21 STACK_START_ADDR = addrCtrl.getVariableAddress("_sdata").getAddress()
22 STACK_END_ADDR = addrCtrl.getVariableAddress("_edata").getAddress()
23 VALUE = 0x55
24
25
26 stack_cfg = cfgCtrl.ide_app().opt('StackUsage')
27
28
29 stack_cfg.set_bool('Use', True)
30 stack_cfg.set_uint('Pattern', VALUE)
31 stack_cfg.set('Position', 'End')
32 stack_cfg.set('Start', str(hex(STACK_START_ADDR)))
33 stack_cfg.set('End', str(hex(STACK_END_ADDR)))
34
35
36
37
38 print(f'Disable by setting option `Use` to `False`')
39 stack_cfg.set_bool('Use', False)
40
41
42if __name__ == "__main__":
43 test_configureStackUsage()