This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS: Version 6.2.0.00050.

Other Parts Discussed in Thread: CCSTUDIO

Tool/software: Code Composer Studio

Using CCS version 6 to unit test with 'Rational Test RealTime' (RTRT) version 8.0.1, the TDP contains the following (commonly used) lines:

// Import the DSS packages into namespace

importPackage(Packages.com.ti.debug.engine.scripting)
importPackage(Packages.com.ti.ccstudio.scripting.environment)
importPackage(Packages.java.lang)
importPackage(Packages.java.io)

Unfortunately, these lines fail when the unit test is run with the following error:

'Packages' is undefined

This may be (partially) due to the CLASSPATH not being set up. In which case the question is, where should the CLASSPATH be set up in RTRT's TDP?

However, also, assuming CLASSPATH were set up to the following directory:

C:\ti\ccsv6\ccs_base\scripting\docs\DS_API

This would only satisfy the first 2 directory specifications of "Packages.com.ti.debug.engine.scripting" and "Packages.com.ti.ccstudio.scripting".

There is no subdirectory .java.lang (neither is there a subdirectory of just lang) anywhere under the C:\ti\ directory. Nor is there a java.io subdirectory (although there is an io subdirectory as follows:

C:\ti\xdctools_3_32_01_core\packages\xdc\services\io.

So, the 2nd question is, to what should CLASSPATH be set up?

  • Hello,
    I believe you need the following paths set up:

    <CCS6 INSTALL DIR>\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\js.jar
    <CCS6 INSTALL DIR>\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\dss.jar

    thanks
    ki
  • Ki
    Many thanks for the suggestion.
    Unfortunately, I'm a novice at JavaScript, and am not sure what setting up a path entails.
    The following lines in front of the 'ImportPackage' lines failed left the problem unchanged:
    1.
    <CCS6 INSTALL DIR>\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\js.jar
    <CCS6 INSTALL DIR>\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\dss.jar

    2.
    C:ti\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\js.jar
    C:\ti\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\dss.jar

    3.
    var Packages = C:ti\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\js.jar
    var Packages = C:\ti\ccsv6\ccs_base\DebugServer\packages\ti\dss\java\dss.jar

    Any other ideas or further clarification would be gratefully received.
    David Checkley
  • You don't set the CLASSPATH in your javascript. Please see the below information:
    en.wikipedia.org/.../Classpath_(Java)

    Note that the first paths are invalid. <CCS6 INSTALL DIR> is just my variable to represent whatever the CCSv6 installation directory is in your environment.
  • Ki,

    many thanks for our information.

    The following environmental variable has now been set up through the Control panel, as follows:

    Control Panel->System->Advanced System Settings->Environmental Variables->PATH

    ;C:\ti\ccsv6\ccs_base\DebugServer\packages\ti\dss\java

    Unfortunately, even after a power-cycle, this leaves the same error as before:

    'Windows Script Host'

    Error  'Packages' is undefined

    etc.

    David Checkley

  • Did you add the path to the jars under the CLASSPATH variable (not PATH)?
  • Ki,
    many thanks for your information.
    This solution looks good & has stopped the error message about 'Packages' being displayed.
    Once again, many thanks.
    David Checkley