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.

Starting CCS V5 with specified JS file or GEL file

Other Parts Discussed in Thread: CCSTUDIO

Is it possible to start CCS so that it comes up in the state that would be achieved by starting CCS, opening the scripting console, and giving a loadJSFile command with a string provided outside CCS?

Perhaps there is a command option, like:

C:\ti\ccsv5\eclipse\ccstudio.exe -js "C:\random_place\somefile.js"

js:> loadJSFile("C:\random_place\somefile.js");

Failing that, can a similar thing be done using GEL files?

The crucial thing is that there must be no requirement to go into CCS and do anything manually.

  • Hello Peter,

    Instead of using loadJSFile, you can place your javascript in this directory:

    <CCSv6 INSALL DIR>\ccsv6\ccs_base\common\IDE\scripts.

    If the 'scripts' subdirectory does not exists, you can create it.

    CCS will autoload any js scripts found in that location when launched.

    Thanks

    ki

  • Thank you for your suggestion, but this is not a sensible solution.

    I am attempting to automate a tedious process. Consider what happens if I wish to debug two programs, A and B. My build process for A creates its script (say, A.js) into the common directory; I can now debug A. I now build B and the directory ends up with both A.js and B.js; both will get loaded causing untold confusion. I could try deleting all files in the directory before adding a new one. Now I can build and debug B, but then I can't debug A without rebuilding it. Also, deleting all files in that directory will cause problems should a truly global .js file is required.

    I was trying to be quite specific in my question: can CCS be started so that it executes a .js file peculiar to that invocation without further user intervention?

  • Peter Robertson said:
    I was trying to be quite specific in my question: can CCS be started so that it executes a .js file peculiar to that invocation without further user intervention?

    No. This is not possible. You cannot launch the CCS executable and have it auto-execute a specified javascript without any manual intervention.

    Peter Robertson said:
    I am attempting to automate a tedious process. Consider what happens if I wish to debug two programs, A and B. My build process for A creates its script (say, A.js) into the common directory; I can now debug A. I now build B and the directory ends up with both A.js and B.js; both will get loaded causing untold confusion. I could try deleting all files in the directory before adding a new one. Now I can build and debug B, but then I can't debug A without rebuilding it. Also, deleting all files in that directory will cause problems should a truly global .js file is required.

    How about having one global script (that gets auto-loaded) and after a build process for a particular project, it appends to the global js file by adding a function that can be called from a menu item to execute the script to debug that particular program?

    It would require some manual intervention however - pressing a menu item.

  • I've got it down to Ctrl+C and return which I think is easier.

    Adding the ability to specify a startup .js file would seem to be a useful addition to CCS.