winIDEA SDK
test_get_symbol_at_address.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_getSymbolAtAddress():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
14
15 # for STM32 use
16 ADDRESS = 0x200019AC
17 # for TC399xe use
18 # ADDRESS = 0xD0001020
19
20 addCtrl = ic.CAddressController(connMgr)
21 # 0 = main memory area (the only application)
22 varName = addCtrl.getSymbolAtAddress(ic.IConnectDebug.sVariables, 0, ADDRESS)
23 print(f"At address '{hex(ADDRESS)}' is variable '{varName}'.")
24
25
26if __name__ == "__main__":
27 test_getSymbolAtAddress()