winIDEA SDK
test_launch_core1.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
8WORKSPACE_PATH = r'..\..\..\targetProjects\SampleSTM32-qemu.xjrf'
9
10
11def test_launchCore1():
12 cfg = ic.CConnectionConfig()
13 connMgr = ic.ConnectionMgr()
14 connMgr.connect(cfg)
15 print(f"Is core with index 1 launched: {connMgr.isCoreLaunched(0)}")
16
17 print("Launching core with index 1...")
18 connMgr2 = connMgr.launchCore1(1)
19 wksFilePath = ic.CIDEController(connMgr2).getPath(ic.CIDEController.WORKSPACE_FILE_NAME)
20 print(f"\tDone, connected to instance: {wksFilePath}")
21
22 print("\tDisconnecting.")
23 connMgr2.disconnect_close(bSaveAll=False)
24
25
26if __name__ == "__main__":
27 test_launchCore1()