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.

Use open source for embedded software test

http://www.embeddeddesignindia.co.in/STATIC/PDF/200904/EDIOL_2009APR16_ETEST_TOOL_TA_01.pdf?SOURCES=DOWNLOAD

Hi,

   Has anyone tried the method in the above link: use open source for embedded software test. I failed but could not find the reason.

Br,

AppleCat

  • I wrote the article and everything in there should work.  What specifically is not working for you?

    Darian

  • Hi, Darian,

           Glad to know the author is here.

           I am trying to debug a target via junit test in CCSv4. But whenever I am debug a junit test, it prompts, "An internal error occurred during: "Model Proxy installed notification job."  (see the attachmed figure.)

    What is the problem?

     

    AppleCat

     

  • First, what version of CCS are you using?  Is this beta 5 update 1?  Did you download any any updates after adding Java support?  I've tried this again on beta5 update 1, without any other eclipse updates, and it's still working in this version.

    Second, can you open the error log (Window->Show View->Other and browse for "Error Log"), clear it, and try to debug the junit test again?  A new entry should be added.  If you double click that, an exception stack trace should be visible.  Could you copy that and add it here?

    Thanks,
    Darian

  • Hi, Darian,

    Darian Sale said:

    First, what version of CCS are you using?  Is this beta 5 update 1?  Did you download any any updates after adding Java support?  I've tried this again on beta5 update 1, without any other eclipse updates, and it's still working in this version.

                Is this beta 5 update 1? :        Yes, after the night of installing CCSv4_4.0.0.14000_package.exe, I also update it according to the following Figure -1.

               Did you download any any updates after adding Java support?   Yes, beside the above update, I remember that I also have another installing of a Java(Eclispe?) update.

               To avoid the posted problem, I had tried to uninstall the CCSv4 (but I had not  deleted all the files under folder \Texas Instruments\!!!) and re-run CCSv4_4.0.0.14000_package.exe, re-extract JDT to \Texas Instruments\ccsv4, the problem still existed !!!

               However, when in this morning I uninstalled the CCSv4, and deleted all the files under the folder \Texas Instruments\, re-run CCSv4_4.0.0.14000_package.exe, then re-extract JDT to \Texas Instruments\ccsv4, the prompt disapppear!!!

     

    Darian Sale said:

    Second, can you open the error log (Window->Show View->Other and browse for "Error Log"), clear it, and try to debug the junit test again?  A new entry should be added.  If you double click that, an exception stack trace should be visible.  Could you copy that and add it here?

             I am sorry to say that I did not keep the Error Log, but if next time I come across the same prompt, I will copy the exception stack trace.

            Really thanks for your advice.

     

    Br,

    AppleCat

    Thanks,
    Darian

     

    Figure-1

  • You definitely don't want to pull in updates from eclipse.  I believe the CCS 4 update manager only scans for TI updates, but if you drop in the JDT plugin, then eclipse will start looking for eclipse updates and that will overwrite some of the changes TI made. The uninstaller also won't delete files it didn't install, so the JDT plugin should still be there after.

    You were correct to uninstall, delete any of the files in there, and then re-install and re-patch.  I'm not sure what you meant by the prompt disappearing though - could you elaborate on that?

    You might also need to clean your workspace though if you tried to re-use the same workspace as before.  You should either start eclipse from the command line with -clean, or just create a new workspace.

    Darian

  • <quote>You were correct to uninstall, delete any of the files in there, and then re-install and re-patch.  I'm not sure what you meant by the prompt disappearing though - could you elaborate on that?

    </quote>

    "prompt disappearing" means the problem is resolved.

    Sorry for my mis-description.

    I totall agree with you. I think this post could be closed.

  • Hi,

           http://www.embeddeddesignindia.co.in/STATIC/PDF/200904/EDIOL_2009APR16_ETEST_TOOL_TA_01.pdf?SOURCES=DOWNLOAD

            From the above link, it seems that a junit test could be debugged in a Eclise-based CCS envrionment, and the junit test case could lauch another debug session to debug a program in a targer during the running time. Am I understand correctly? But unforturnately, I failed.

            In the above link, it says,

     

        I am quite confused: where to run the DSS command, ScriptingEvironment.instance().getServer("CCSServer.1").openSession(".*")? is it in the Scripting console? or shall I add the following code to the java test case?

    ScriptingEnvironment env = ScriptingEnvironment.instance(); 

    env.getServer("CCSServer.1").openSession("C64xp Megamodule Cycle Accurate Simulator, Little Endian/TMS320C64+"); 

     

    Br,

    AppleCat

  • Hi,

    When you are debugging the DSS junit test, you'll only be able to debug your java test code.  If you want to debug your target code at the same time, you'll need to execute that command.  You can execute it as part of the test (perhaps in a catch statement when things go wrong, or at the beginning of the test etc), or if you're halted at a breakpoint you can add that statement to the expressions view (as the eclipse expression view can actually execute java functions).

    This link shows how it works if you are using a javascript dss script vs java.  It has more pictures than the article did: http://community.itg.ti.com/digital/forums/t/900.aspx

    Darian

  • Hi, Darian, 

                 It seems that the link, http://community.itg.ti.com/digital/forums/t/900.aspx, does not work, doesn't it?

     

    Br,

    AppleCat

  • AppleCat,

    Use this url: http://tiexpressdsp.com/index.php/Debugging_Your_DSS_Script_Using_CCS. You should be able to access that one. The other one is an internal link only.

    Thanks

    ki

  • Hi, Ki,

            The url in your reply is about using RHINO_DEBUGGER (NOT CCSv4 with jdt installed) to debug the javascript. However, I want to know whether I could run junit test running in the ccsv4, so that the junit test could lauch another ccs debug session to debug a target.

    Br,

    AppleCat

  • AppleCat,

    The same concept applies.  If you are using CCS4 to debug a java dss test, and you execute that java command, then another CCS4 will start (you'll need to choose another workspace) and that will will debug the target. 

    It launches a second CCS4 as the java debugger runs the application to debug in another process.  Effectively the test code will run CCS4 and then CCS4 will connect to the same debugger as your test is connected to.

    Darian

  • In your scenario you can disregard the references to ther rhino debugger since you are using Eclipse as your debugger instead. The information on when to open a CCSSession and the rest of the flow is still relevant.

    ki

  • Hi, Darian,

                  Yes,  when I am using the following code, and I set a breakpoint after openning another CCSSession, another CCS4 will start , and then I choose another workspace. However, when I continue to run the java code, the newly-lauched CCV4 shows nothing at all !!! Am I missing some necessary configurations?

    Best regards,

    AppleCat

     

         ScriptingEnvironment env = ScriptingEnvironment.instance();
         
          DebugServer debugServer = null;
          DebugSession debugSession = null;
         
          env.getServer("CCSServer.1").openSession("C64xp Megamodule Cycle Accurate Simulator, Little Endian/TMS320C64+");

          // Create a log file in the current directory to log script execution
          env.traceBegin("BreakpointsTestLog.xml", "DefaultStylesheet.xsl");

    //       Set our TimeOut
          env.setScriptTimeout(15000);

    //       Log everything
          env.traceSetConsoleLevel(TraceLevel.ALL);
          env.traceSetFileLevel(TraceLevel.ALL);
         
            debugServer = (DebugServer ) env.getServer("DebugServer.1");

            debugServer.setConfig("tisim_c64xple.ccxml"); // You always need to specify a target configuration with DSS

            debugSession = debugServer.openSession("C64xp Megamodule Cycle Accurate Simulator, Little Endian/TMS320C64+");

  • Hi, Ki,

                Yes, I am using Eclise as my debugger of the junit, but I still could not repeat in Eclise what the rhino debugger could do. I am confused by the difference between CCSServer/CCSSesion and DebugServer/DebugSession.

    Best regards,

    AppleCat

  • Once the second CCS4 has started, find the ccxml file you're using in the junit tests (looks like "tisim_c64xple.ccxml" from the above code) in the target configurations view (view->target configurations) and then right click on it and select "debug as->debug session". 

    Darian

  • AppleCat,

    You need a CCSServer/CCSSession when you want to launch (another) CCSv4 instance to debug the target itself (while the first CCSv4 is debugging the junit test). The DebugServer/DebugSession is needed to launch the actual debug session.

    Basically for most automation (junit, DSS), you need just DebugServer/DebugSession to launch a debug session. If you want to launch (another) CCSv4 instance to have visibility on the target itself, you need to add one line to your junit code or DSS script:

    script.getServer("CCSServer.1").openSession(".*");


    The rest of the code would remain the same.

    ki

     

  • Hi, Darian,

            Great thanks to you.  It works the same as what  you mention in your paper.

            Thank both Darian and Ki. After fixing this problem, I can set out my program unit test now.

     

    Br,

    Apple

  • Hi, Ki,

               Yes, just add a line a code to the java at an appropriate location, then all will work. Previously, I was confused what  I should do once a new CCS4 Session was lauched. I think Darian has cleared my confusions. Great thanks to you both, and have a nice day.

                ...And I have to leave the office to go home, it is 10:56 PM at BeiJing Time. Bye.

     

    Br,

    AppleCat

  • Hi, Darian,

             Thanks a lot.  Unfortunately, according to the post, I have to manually launch the debugssion in the new launched CCSServer.

             I am wondering, whether there is a method  to automate the lauch of a specific debug session whenever the new CCSv4 server is launched.

             Glad to hear your advice.

     

    Br,

    AppleCat

  • I'm sorry, nothing like that exists today.  You always have to manually launch after the workspace comes up.

    Darian
  • You can create a script call autoLaunch.js and place it in <install dir>\CCS4.0.0.16000\ccsv4\common\IDE\scriptingConsole\scripts, if these folders doesn't exist, than create them.

    Enter this line into your script, "launchTIDebugger();". Open the scripting console, shutdown the IDE without closing the scripting console. Than the next time you startup the IDE, launch TI debugger will be call automatic for you.

    Hope this help.

    Regards,
    Patrick

  • Hi, Patrick, sincere thanks for this trick.  It works and helps, except that

     

     

    Initializing ................................................................................................................................................................................................................................................

     

    TIMEOUT: failed to initialize scripts, try to increase timeout value by setting the environment variable SCRIPTING_CONSOLE_INIT_TIMEOUT to a larger value, in millisecond, and restart.

     

    js:>

     

    ReferenceError: "loadJSFile_InternalCmd" is not defined

     

    Although the above TIMEOUT ERROR occurs, a debug session is also lauched after as the start-up is completed.

    I think, the "loading device information..." consumes a lot of time.

     

     

  • You are correct, loading the device info blocks the script to launch the debug session.

    You can set the system enviornment variable to a larger number to prevent the time out to occur.

    No, disabling the list of plugin in your screenshot won't help the load time of the device info. It is parsing a bunch of target database xml files.

  • Hi, Patrick,

            Any advice to reduce the "loading-device information" time? Should I uninstall the following "rectangled" configurations

    ?

     

  • Hi, Patrick,

      I found a way to reduce the device information loading time,

    Browser to %install_dir%ccsv4\common\targetdb\

    remove all the unnecessary target files (ie. .xml)  from the following folders,

    boarddat

    boards

    configurations

    cpus

    Devices