winIDEA SDK
test_create.py
1# This script is licensed under BSD License, see file LICENSE.txt.
2#
3# (c) TASKING Germany GmbH, 2023
4
5import os
6import tempfile
7import isystem.connect as ic
8
9
10
11def test_create():
12 connMgr = ic.ConnectionMgr()
13 connMgr.connect()
14 wksCtrl = ic.CWorkspaceController(connMgr)
15
16 # Prepare configuration for creating new workspace
17 wksPath = os.path.join(tempfile.gettempdir(), 'tmp_workspace.xjrf')
18 debugCfg = ic.CCfg_debug_basic()
19 debugCfg.set_AppName('App')
20 debugCfg.set_Device('x86')
21 debugCfg.set_DeviceName('SomeName')
22
23 # Some other settings you can set
24 # debugCfg.set_CreateSMP(True)
25 # debugCfg.set_SymPath('<path_to_symbols>')
26 # debugCfg.set_UseSymForPgm(False)
27 # debugCfg.set_ReplaceDir('<old_path>=<new_path>;')
28
29 # Create new workspace
30 wksCtrl.create(rstrWorkspaceFileName=wksPath, rstrIOPEN='', rCfg=debugCfg)
31
32if __name__ == "__main__":
33 test_create()