• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » Code Composer Studio » Code Composer Forum » CCS4: Cannot see static and local variables in Debugger
Share
Code Composer Studio
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Common Questions
  • Code Composer Studio Forum Usage Guidelines

  • Resources
  • Code Composer Studio (CCStudio) Product Folder
  • Troubleshooting CCS
  • CCS Wiki
  • Download CCS
  • Order CCS
  • Tools Insider Blog
  • Bug Tracking
  • CCS4: Cannot see static and local variables in Debugger

    CCS4: Cannot see static and local variables in Debugger

    This question is answered
    Michael Berweger
    Posted by Michael Berweger
    on Mar 25 2010 03:19 AM
    Prodigy10 points

    Hi

    Using CCS 4 i don't see values of static and local variables even when debugging in same Module (C-File) or function.

    With global Variables there is no problem. Also in CCS3 it did work fine. Is there any options to enable the acces to this symbols?

    Michael

    Version of CCS3: 4.1.1.00014
    Target: TMS320F28035
    Debugger: XDS510LC

     

     

    debug information 28xx 28xxx CCS 4
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • desouza
      Posted by desouza
      on Mar 25 2010 15:15 PM
      Guru55930 points

      Michael,

      If the full symbolic debug is turned on and the optimizer is off, so the local variables are not stored in registers to increase efficiency, I don't see a reason why they are "disappearing". Are you sure you have these two options correctly configured?

      Sometimes local variables can go away if they are never used in the routine, but I wonder if this is the case.

      Hope this helps,

      Rafael

       


      If my reply answers your question please click on the green button "Verify Answer".
      Search the wiki or go to useful pages for SDOWP, CGT, BIOS, CCSv3, CCSv4, CCSv5
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ed Rogalsky
      Posted by Ed Rogalsky
      on Mar 29 2010 08:24 AM
      Prodigy50 points

      Hi,

      I have the same problem with ccs4 either

      CCS Version: 4.1.1.00014

      C2000 Compiler Settings:

         Basic Options:

             Debugging model: Full symbolic debug (--symdebug:dwarf, -g)

             Optimization level: none

      Device: TMS320F2809

      Emulator: XDS510 USB

      Code Example:

       void do_test()

       {

           static BOOL_T is_error = MY_FALSE; 

           is_error = get_error_state();

         if(is_error == MY_TRUE)

         {

              handle_error();

         }

      }

      The static local var "is_error" to watch  => identifier not found

      Ed Rogalsky

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ki-Soo Lee
      Posted by Ki-Soo Lee
      on Mar 30 2010 10:37 AM
      Verified Answer
      Verified by Ki-Soo Lee
      Guru116780 points

      Yes I see this issue. You have to append a $<number> to the variable. You can find what that number from the Modules view (Window->Show View->Other->Debug->Modules). Looks like it means it's the second static variable.

      Bit of a pain. Let me inquire about this a bit more.

      -----------------------------------

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

      Having CCSv5 problems? Check out the CCSv5 Troubleshooting Guide

      Click here to track an issue. Enter your bug id in the "Find Record ID" box

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ki-Soo Lee
      Posted by Ki-Soo Lee
      on Mar 31 2010 08:20 AM
      Verified Answer
      Verified by Ki-Soo Lee
      Guru116780 points

      I've filed this as bug number: SDSCM00035749

      Thanks

      ki 

      -----------------------------------

      Don't forget to verify answers to your forum questions by using the green "Verify Answer" button.

      Did you read the CCS Forum Guidelines & FAQ? If not, PLEASE read it. If you haven't read it in awhile, please read it again to see if any updates were made.

      Having CCSv5 problems? Check out the CCSv5 Troubleshooting Guide

      Click here to track an issue. Enter your bug id in the "Find Record ID" box

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Pedro Lobo
      Posted by Pedro Lobo
      on Apr 29 2010 04:01 AM
      Prodigy10 points

      Ki-Soo, could you elaborate a bit more, please? I am trying to debug a function which uses a variable named "threadbag" that's static to the module. I can find it in the "Modules" view, in the "Globals" section:

      As you can see, there is no "$number" suffix. In fact, there are several "threadbag" variables because other modules have also a static variable with the same name, and there seems to be no means of telling to which module each variable belongs. I guess I could look at the memory address in the map file, but thst's quite a pain.

      There are several symbols named "name$number" in the "Labels" section, but none of them have "threadbag" inside the name. Adding "threadbag" to the watch view brings the an "identifier not found: threadbag" error. Can you think of any practical workaround?

      I am using CCS version 4.1.2.00027, the target is a C6455 and I'm debugging with the C6455 Device Cycle Accurate Simulator.

      Thanks,

      Pedro.

      CCS 4.1 CCSv4.1.2 CCSv4 static variable
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • SBhushan
      Posted by SBhushan
      on Jun 11 2010 10:09 AM
      Intellectual360 points

      I am seeing the same problem (local and static variables not visible in debug) while using Code Composer 3.3.38

      I too have Full Symbolic Debug enabled along with No optimization.

      It is certainly frustrating. Is there a fix for this other than upgrading to a later version?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • David R.
      Posted by David R.
      on Jul 19 2010 21:38 PM
      Expert1065 points

      I am seeing the same problem in CCS 4; trying to debug a Stellaris application on LM3S8962 and several of my local variables do not appear in the debugger's "Local" view, and cannot be found using the "Watch" view.

      Am using full symbolic debugging, with optimization set to 0. I don't see anywhere in the Modules view, however, that provides the $<number> mentioned in the post.

      Has a resolution for this been determined?

      Thanks,
      David R. 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • tank main
      Posted by tank main
      on Jul 22 2010 09:39 AM
      Prodigy15 points

       

      SBhushan & Michael Berweger

      I have the same problem like u either !

      at last i found that if U do program like this .

      you will not  see values of static and local variables even when debugging in same Module!

      Code Example:

       void do_test()

       {

      {

      static BOOL_T is_error = MY_FALSE; 

      .....//some other code 

      }

      int a = 9;

      }

      The static local var "is_error" and 'a' to watch  => identifier not found


      U should try to  code as below:

       void do_test()

       {

      static BOOL_T is_error = MY_FALSE; 

      {

      .....//some other code 

      }

      int a = 9;

      }

       

      then u will see it!!!!!!

       

      i suggest u check your code to make sure that there are not such cases in you program !

       

      good luck!

       

       

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jon Peterson
      Posted by Jon Peterson
      on Aug 21 2010 10:14 AM
      Expert1730 points

      Ki,

      Is there any update on this bug?

      Thanks, Jon

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • andreas von kaenel
      Posted by andreas von kaenel
      on Sep 23 2010 03:10 AM
      Genius4285 points

      Ki,

      An update would indeed be great. I am using CCS 4.1.3.00038 and am having the same issue. Debugging is hard - if not impossible - as long as you have variables out there that you cannot inspect...

      Best regards

      Andreas

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • J��rg Eugster
      Posted by J��rg Eugster
      on Nov 17 2010 04:11 AM
      Prodigy30 points

      Hi!

       

      Had the same problem here, but there's an easy possibility  to display global/static variables:

       

      Right click into the watch window -> "Add global variables..." find your variable there...

       

      Have fun

      Jörg

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • John62016
      Posted by John62016
      on Dec 03 2010 23:14 PM
      Prodigy20 points

       

      Changing the optimization level in Basic Options to "None" solved this issue for me. Earlier, the optimization level was set to "0", and I thought optimization is disabled. But from this thread (http://e2e.ti.com/support/development_tools/f/81/p/28346/100034.aspx) it seems to disable optimization you should choose "None" (or the blank option).

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Vishwa bj
      Posted by Vishwa bj
      on Feb 24 2011 13:47 PM
      Prodigy175 points

      I am using CCS4.2.0 and i am able to see the static variables inside the functions/threads in  watch/local window...with the above options turned on.

       

      Regards,

      Vishwa

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Anonymous
      Posted by Anonymous
      on Aug 12 2011 05:32 AM
      Guru13910 points

      John,

      I tried your suggestion, but I found that there is no "none" option in optimization level. How did you manage to choose that?

       

       

       

       

      Zheng

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Vishwa bj
      Posted by Vishwa bj
      on Aug 12 2011 05:38 AM
      Prodigy175 points

      Zheng,

      There is no option None in the drop down...instead of that you could choose empty row above option 0 ....that acts as option None

       

      Regards,

      Vishwanath BJ

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use