winIDEA SDK
Loading...
Searching...
No Matches
test_code_store_item.py
# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
#
# (c) TASKING Germany GmbH, 2023
import os
import isystem.connect as ic
winidea_id = ''
def test_codeStoreItem():
connMgr = ic.ConnectionMgr()
connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
dataCtrl = ic.CDataController(connMgr)
print(f"Loading current download file...")
codeStore = dataCtrl.csCreate()
wksFolderPath = ic.CIDEController(connMgr).getPath(ic.CIDEController.WORKSPACE_DIR)
dlFilePath = os.path.join(wksFolderPath, "CORE0", "Debug", "example.elf")
codeStore.load(0, dlFilePath, 0)
numOfItems = codeStore.numItems()
for index in range(numOfItems):
csItem = codeStore.getItem(index)
print(f"Dowload file region '{index}':")
print(f"\tStart address: {hex(csItem.getAddress())}")
print(f"\tEnd address: {hex(csItem.getLastAddress())}")
if __name__ == "__main__":
test_codeStoreItem()