Other Parts Discussed in Thread: TM4C1294NCPDT,
I am trying to run dot Net VB code which calls dss scripting APIs through Java as follows
CCS v6
Tiva tm4c1294ncpdt
Eclipse Mars with JRE/JDE 1.7
Visual Studio 2019, .NET Framework 4.6.1
IKVM 7.2.4630.5 to convert jar file to dll
The Java code provides an interface which can be used by my tests written in VB. It runs succesfully from Eclipse GUI during development and testing.
Then I use IKVM tool to convert this to a DLL and follow their instructions to set up my VB project (x86). It builds everything succesfully but when I ran it, I got into several issues when trying to open a debug session.
At first it could not find DebugServer.dll and/or ti_xpcom.dll during the execution. I solved this by adding C:\ti\ccsv8\ccs_base\DebugServer\bin, C:\ti\ccsv8\ccs_base\common\bin and the eclipse subfolder with jvm.dll to PATH env variable, and then registering both the dlls using regsvr32. Now I am stuck at the error message shared below appearing in the console while running the VB project:
traceSetFileLevel: ENTRY sLevel: ALL traceSetFileLevel: RETURN setScriptTimeout: ENTRY nTimeout: 15000 setScriptTimeout: Timeout is 15000ms setScriptTimeout: RETURN getServer: ENTRY sServerName: CCSServer.1 getServer: Getting definition for: CCSServer.1 getServer: Constructing server getServer: RETURN com.ti.ccstudio.scripting.CCSServer@1629f15 WARNING: CCSServer.openSession() failed. DSS was unable to launch Code Composer Studio, however script execution will continue. java.lang.ClassNotFoundException: com.ti.ccstudio.apps.scripting.ScriptUtils getServer: ENTRY sServerName: DebugServer.1 getServer: Getting definition for: DebugServer.1 getServer: Constructing server getServer: RETURN com.ti.debug.engine.scripting.DebugServer@ff8584 setConfig: ENTRY sConfigurationFile: D:\Tiva_TM4C1294NCPDT.ccxml setConfig: RETURN getCurrentDirectory: ENTRY getCurrentDirectory: RETURN E:\AKS Projects\dotNet\CCS_Automation_VB\bin\x86\Debug openSession: ENTRY sPattern: Stellaris In-Circuit Debug Interface/CORTEX_M4_0 start: ENTRY start: Firing: onServerStarting() start: Connecting to XPCOM DebugServer boost::filesystem::create_directory: The filename, directory name, or volume label syntax is incorrect: "D:\Applications\ti\ti_app_dir\C:" If this continues, please run fsclean or set TI_APPDATA_DIR to directory you have permissions to access
At first the error was "C:\Users\AKS\AppData\Local\Texas Instruments\CCS\C:" not found. At this time there was no TI_APPDATA_DIR env var in my PC. I then created the var TI_APPDATA_DIR = "D:\Applications\ti\ti_app_dir" and now the error is "D:\Applications\ti\ti_app_dir\C:" not found. I am not able to find out how "C: is appended at the end of the path or even why this path is needed at all by the DSS runtime dlls.
I have somehow figured that this is thrown by fsutils.dll by cannot remember or find out anymore how. But if you open that dll in a textpad you can see the same error message about "TI_APPDATA_DIR" there.
The error occurs when trying to execute the following Java code (from VBS 2019). Also there is an exception thrown simultaneously in the VS GUI as in the screenshot:
debugServer.setConfig("D:\\Tiva_TM4C1294NCPDT.ccxml"); //debugSession = debugServer.openSession(".*"); debugSession = (DebugSession) debugServer.openSession("Stellaris In-Circuit Debug Interface/CORTEX_M4_0");
The Java code is invoked from IKVM through the support of runtime dlls which I have included in the project. I am not sure if somehow this is also contributing to the error. But so far all the errors occured due to paths not found when trying to execute the code outside of Eclipse. Therefore I am raising this ticket with TI first.
I am kind of losing my mind with spending several days solving several errors and now stuck here. As I have mentioned in the related thread, there is no other way I can pursue than trying to run the Java code from VB. Will be great to know what is happening here if someone can help. Thanks!