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 not running to main() in debug mode

Other Parts Discussed in Thread: TMS320C5505

Hi,

I am running CCS V5.2.1.00018 on Windows 7 with MSPFET430UIF

System 1 - 430F5137

    Connected via Spy-By-Wire as per Fig 2-3 on SLAU278L - using IAR & downloading & running ok

System 2 - 430F6137

Connected via Spy-By-Wire as per Fig 2-2 on SLAU278L - using CCS program downloads but does not run to main()

Code will run manually due to a reset

If connected via Spy-By-Wire as per Fig 2-3 on SLAU278L (Which should be correct) - using CCS program it does not download (no target found)

Any ideas,

Thanks,

Alan..

 

 

  • Alan:

    I have had similar problems when running CCS 5 against the TMS320C5505 processor ... http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/172226.aspx

    I actually think I had a lot more problems when I was using CCS 4. Right now, I do not see as many problems with CCS 5.3, but as I stated, it was somewhat intermittent.

     

  • Hi Todd,

    Thanks for your reply..

    I am currently upgrading to 5.3 to see if that helps (I will know in about an hour)

    My existing setup (hardware & software) will allow a different application to be downloaded and run.   If I try to download with the target board not powered - then close the program down and remove MSPFET430UIF USB lead, reconnect & restart/download/debug  (this always works for this different program)

    I can always download, but not go to main with my current program !!

    Best Regards,

    Alan..

     

  • Hi Alan,

    please keep us informed.  Also, instead of running to main, what behaviour do you see? Do you have "run to main" enabled in the debug settings?

    Best Regards,
    Lisa

  • Hi Lisa

    Yes Run to Main is enabled, the program seems to load ok, as I can change code & manually reset it to get ot to run

    CCS does not crash in fact if another download is attempted CCS asks to terminate the existing debug session.

    Console displays : MSP430:  Program loaded. Code Size - Text: 6471 bytes  Data: 48 bytes

    Within the Run tab everything is grayed out !

    I have tried to disabled Run to main to attempt to make it enter startup code, but it does not get to any code

    I have seen someone on a forum suggest IAR startup code not compatible with CCS & therfore might hang, and need some sort of pragma to fix it !

    Thanks,

    Alan..

  • Hi Alan,

    could you send a screen capture.  How are you launching the debug?   It is possible it could be incompatibility between IAR/CCS ... is the code identical or have you created a CCS version double checking some of the compiler speicific items?

    There is documentation on migration in this document

    http://www.ti.com/lit/ug/slau157w/slau157w.pdf

    Best Regards,
    Lisa

  • Hi Lisa,

    Good morning,

    I have added in the function below to my code:

     

    ************************************************************************************************************************************************************

    // Pre initialisation - stop watchdog - This pre initialisation should run BEFORE the library system_pre_init()

    int _system_pre_init(void){

         WDTCTL = (WDTPW + WDTHOLD);                    // Disable watchdog

         return (1);                                                              // Causes origional system_pre_init() to be executed

    }

    ***********************************************************************************************************************************************************

     

    Unfortunately this has not helped the debugger to start, - questions:

         Is there any way to check this new code is being called ?

         What is my next best possible thing to try ?

    Thanks

    Alan..

     

  • Hi Lisa,

    I may have made some progress, here is what I did :

    I created a new minimal CCS project in a new directory & new name, but the same workspace as my existing project

    The code loads but does not run / debug as before.

    Then I created a new minimal project in a new directory & new name but with a NEW workspace (New workspace defined at CCS Startup)

    The code loads & runs / debugs ok

    This seems to be suggesting there is a setting in my existing workspace that is causing a problem !!

    Question : How do I copy my existing project to a new workspace ?

    Thanks

    Alan..

  • Hi Lisa /Todd,

    I have copy my project to a new workspace & All now running OK, here is what I did:

    I created a new workspace at CCS startup

    I selected Import -> Existing CCS projects

    I browsed for the directory of the existing project I wished to import

    CCS discovered the project & I selected it

    I selected - Copy project into workspace

    I selected Finish

    Running fine in debug mode - I realise this is not getting to the root cause of the problem, but it works !!

    Todd, hope this helps you as well

    Lisa please close, many thanks

    Alan..

  • Hi Lisa,

    Problem still exists - worked ok for about 15 minutes, I assume if I create another workspace & import again it would be ok for a while

    I need to look at the workspace configuration settings

    How do I do this

    Best Regards,

    Alan..

  • Hi Alan,

    glad that it seems at least one next step has been taken.  Global workspace settings are in WIndow->Preferences.   You can have a look there.  First thoughts are corruption or something like a java memory issue. 

    Please keep us informed how things progress.  You can try increasing the java memory.

    Best Regards,
    Lisa

  • Hi Lisa,

    I have narrowed this down to the workbench.xml file in :

    <project path.\.metadata\plugins\orgeclipse.ui.workbench

    I have created a good and bad file, both are attached, they are both consistent (tried about 5 times each with application unchanged)

    Are you able to spot what might be the problem ?

    Thanks

    Alan..

  • Hi Alan,

    I don't seem to see any attachments.  Could you please try reattaching them again for use to have a look at?

    Thanks and regards,
    Lisa

  • Hi Lisa,

    I will try using Options this time instead of the Insert File icon

    I don't know how to attach 2 files so I will do a second post

    This is the good file attached

    Thanks

    Alan..

  • Hi Lisa

    This is the bad file attached

    Thanks

    Alan..

  • Alan,

    Launch settings are not stored in the workbench.xml file, this file stores UI settings for CCS, no debugger options. The debugger options are stored in your workspace, in this folder .metadata\.plugins\org.eclipse.debug.core\.launches.

    How did you change the debugger options, through the debugger option view or through the launch configuration dialog? If you are changing debugger options through the debugger option view, don't forget to hit the "Remember My Settings" button. Otherwise, the setting will be revert back to the settings from the launch configuration.

    Regards,
    Patrick 

  • Hi Patrick,

    I am unsure of the ways I have changed the  debugger options,

    I  have right clicked the project name in the project explorer and selected properties and changed debugger setup

    I have also used :  Run -> Debug Configurations

    When debugging has been started, I don't think I have used :  Tools -> Debugger Options -> MSP430 Debugger Options

    I don't know where the launch configuration Debug -> Debug is at !!

    I realise the UI settings are held in the workbenck.xml file   but closing down CCS and restoring ONLY this file seems to cause the debugger to run ok for a while, possibly CCS is detecting a file change and resetting something that does matter, When I have the debug problem  I can close down CCS and retry 10 times and the problem persists, and as soon as I copy in my good workbench.xml  I am up and running again (for a while).

    I have taken a copy of the launch file while the system is working , so when I next have the debug  problem I will try restoring it instead

    Many thanks,

    Alan..

     

     

  • Hi Alan,

    The next time you run into this issue, can you attach the good and bad launch configuration files to this thread?

    thanks,
    Patrick 

  • Hi Patrick,

    I took a before and after copy of the launch file (before file is attached and after file is in next post - I also rename .launch to .123 to allow them to be sent)

    The launch file substution did not make debug work - I tried 4 times

    I then tried the workbench.xml file substitution and it worked first time !!

    Any ideas ?

    Thanks,

    Alan..

    LF_SW - before.123
  • Hi Patrick,

    After launch file attached

    Thanks

    Alan..

    LF_SW - after.123
  • Alan Murphy said:

    The launch file substution did not make debug work - I tried 4 times

    Can you tell me what doesn't work? It doesn't stop at main or it doesn't launch?

    thanks,
    Patrick 

  • The two launch files are the same, so this is not an issue with the launch configuration. It must be something else.

    I am wondering if it is better to have a remote debug session, so that I can take a look at your CCS install and try to figure out what happen. It is possible to have a webex remote debug session?

    Regards,
    Patrick 

  • Hi Patrick,

    When it works the first line of the main function is highlighted in green and all option with the Run menu are active - eg Restart / Step Into / Free Run ..

    When it doesn't work the first line of the main function is not highlighted, no Run menu options are active.

    If another debug is attempted - the system requests to terminate the existing debug. so it thinks it is in debug mode

     

    No problem for a remote debug session - I am available for the next 1.5 hours

    What do I need to do at this end, BTW my email address is amurphy@schrader.co.uk

    Thanks,

    Alan..

  • Hi Patrick,

    I have just installed WebEx basic is that what I need at this end ?

    Alan..

  • I am setting up the conference bridge and webex, I'll forward the detail to you through email.

    Regards,
    Patrick 

  • Hi Patrick,

    **** PROBLEM SOLVED ***

    Must keep Debug windown open or minimised when debugging

    Patrick - please give a better explanation to help others

    Many thanks Patrick - super job

    Please close - Alan..

  • After having a webex session with Alan, the issue was not having the Debug view open. CCS (Eclipse) uses the Debug view to drive the other debug views such as Expression, Register, Memory, Disassembly, and Source Editor. The Debug view is also use for selecting different stackframe, so that each of the debug view can show different debug info. eg. local variables in the Variable view.

    The Debug view can be set to display minimal info by setting it to Breadcrumb mode, the Breadcrumb mode setting is under the Debug view's local View Menu.

    Regards,
    Patrick