winIDEA SDK
Loading...
Searching...
No Matches
test_create.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 tempfile
import isystem.connect as ic
def test_create():
connMgr = ic.ConnectionMgr()
connMgr.connect()
wksCtrl = ic.CWorkspaceController(connMgr)
# Prepare configuration for creating new workspace
wksPath = os.path.join(tempfile.gettempdir(), 'tmp_workspace.xjrf')
debugCfg = ic.CCfg_debug_basic()
debugCfg.set_AppName('App')
debugCfg.set_Device('x86')
debugCfg.set_DeviceName('SomeName')
# Some other settings you can set
# debugCfg.set_CreateSMP(True)
# debugCfg.set_SymPath('<path_to_symbols>')
# debugCfg.set_UseSymForPgm(False)
# debugCfg.set_ReplaceDir('<old_path>=<new_path>;')
# Create new workspace
wksCtrl.create(rstrWorkspaceFileName=wksPath, rstrIOPEN='', rCfg=debugCfg)
if __name__ == "__main__":
test_create()