winIDEA SDK
Loading...
Searching...
No Matches
test_cs_verify_downloaded.py
1# This script is licensed under BSD License, see file LICENSE.txt, or search for `License` in the SDK online help.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import os
6import tempfile
7
8import isystem.connect as ic
9
10
11winidea_id = ''
12
13
14def test_csVerifyDownloaded():
15 connMgr = ic.ConnectionMgr()
16 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
17
18 dataCtrl = ic.CDataController(connMgr)
19
20 print(f"Verifying downloaded items against selected download file...")
21 wksFolderPath = ic.CIDEController(connMgr).getPath(ic.CIDEController.WORKSPACE_DIR)
22 dlFilePath = os.path.join(wksFolderPath, "CORE0", "Debug", "example.elf")
23
24 with tempfile.TemporaryDirectory() as tmpFolder:
25 filePath = os.path.join(tmpFolder, "report.txt")
26 codeStorage = dataCtrl.csVerifyDownloaded(0,
27 dlFilePath,
28 filePath,
29 ic.IConnectDebug2.ccSrcLoaded)
30 print(f"\tCreated report file: {filePath}")
31
32 # NOTE: this is a temp file and will be removed at the end of this function
33 """ set BP here and inspect file manually or modify `filePath` """
34
35
36if __name__ == "__main__":
37 test_csVerifyDownloaded()