• 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 » CCS V 5 compilation problems
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
  • Forums

    CCS V 5 compilation problems

    This question is answered
    peter lagergren
    Posted by peter lagergren
    on Apr 26 2012 16:16 PM
    Intellectual985 points

    I downloaded the simple email example application for the MSP430FR5279/CC3000 and tried to compile it in CCS. The unzipped code has both IAR and CCS project files.

    CCS chokes completely on trying to compile when faced with

    if __CCS__

    typedef struct (whatever)

    these errors lead to cascading errors because these usually happen in .h files.

    Obviously I am doing something really wrong.  Any hints?

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • peter lagergren
      Posted by peter lagergren
      on May 22 2012 15:25 PM
      Intellectual985 points

      Hi Lisa,

      Just to verify what I was doing, I downloaded the msp430fr5739 user experience demo project, built it and launched the debugger - and it worked, right out of the box. I am going to explore the setup and see why this works and nothing else does. Stay tuned...

      PEter

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • peter lagergren
      Posted by peter lagergren
      on May 22 2012 16:35 PM
      Intellectual985 points

      Hi Lisa,

      Curioser and curioser - not only is the user experience demo still working but I got another simple program debugging correctly. However, I still can't get any of my other programs to debug, so I'm not much further ahead having to do this by rote. There seems to be a problem with loading the program into the debugger - what I have seen is that the debugger tells me that the code was loaded but when I hit Free Run the board is still running the previous program. Which makes sense - if I had previously loaded a non-working program in the debugger when I tried to replace that and the program won't load then I am stuck with a non-working program in FRAM. 

      Is there any way to copy the project settings?

      More to follow, I'm sure.

      Peter

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Lisa TI
      Posted by Lisa TI
      on May 22 2012 17:37 PM
      Guru100045 points

      Hi Peter,

      at least you have been starting to isolate things.   What is different with your projects?  You can go File->Export and give exporting some settings a try.

      Please keep us informed.

      Best Regards,
      Lisa

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • peter lagergren
      Posted by peter lagergren
      on May 22 2012 20:09 PM
      Intellectual985 points

      Hi Lisa,

      It is an interesting, though maddening problem. I think it is the downside of feature expansion where the development environment has gotten complex enough and the hardware small enough that automated setup is absolutely necessary - which hides a good portion of the process. Who would have ever thought that microcontroller development would be like debugging the Windows 3 API?

      Perter

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • peter lagergren
      Posted by peter lagergren
      on Jun 05 2012 16:02 PM
      Intellectual985 points

      Hi Lisa,

      Debugging an app with CCS v5.2 and I have set several breakpoints which do show up in the left-most column of the source code while debugging and also in the breakpoints view. The breakpoints always show up as [H/W BP] but the debugger never breaks on them. For instance:

      //*****************************************************************************
      //
      //! \brief Handles SMTP Server Errors

      //! \param servResp is the server response
      //!
      //! \return None.
      //
      //*****************************************************************************
      void smtpErrorHandler(char * servResp)
      {
      // Currently we don't handle the errors
      while(1)
      {
      __no_operation();
      }
      }

      I put the breakpoint at _no_operation and the debugger just cycles past it.

      Any thoughts?

      Peter

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Douglas Gwyn
      Posted by Douglas Gwyn
      on Jun 06 2012 01:53 AM
      Expert2060 points

      You're still missing the semicolon.

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • peter lagergren
      Posted by peter lagergren
      on Jun 06 2012 08:08 AM
      Intellectual985 points

      I'll bite: where?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Douglas Gwyn
      Posted by Douglas Gwyn
      on Jun 08 2012 18:58 PM
      Expert2060 points

      A commonly encountered but hard to diagnose error is along the lines

      struct tag { .... }

      main( ... ) { ... }

      This actually declares main as returning type "struct tag".  The struct declaration requires a termninating semicolon.

      That may not be your problem, but it sort of sounded like it might be.

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • peter lagergren
      Posted by peter lagergren
      on Jun 09 2012 16:52 PM
      Intellectual985 points

      Hi Douglas,

      Good thing to know. Thanks!

      All my structs are defined in .lib files and I checked all of them and no joy. Guess I'll have to keep looking.

      Peter

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Douglas Gwyn
      Posted by Douglas Gwyn
      on Jun 10 2012 17:05 PM
      Expert2060 points

      I don't know how your "structs are defined in .lib files".  In C source code, the struct declarations must be visible before they can be used.  Often, they are declared in a header (.h) file.  All that a header does is in effect insert its contents in-line into the source where it was #included, so it is as though all the relevant code is embedded in the same C source file.

      In one of your earliest posts in this thread, you told Lisa:

        #ifdef __CCS__
        typedef struct __attribute__ ((__packed__)) _hci_flags_t
        #elif __IAR_SYSTEMS_ICC__
        #pragma pack(1)
        typedef struct _hci_flags_t
        #endif
        And I get a
        -missing
        - #66 expected a ';'
      That code definitely is missing the terminating semicolon on each of the two typedef declarations, and indeed that's what the compiler told you.
      In fact those particular examples would not be correct even with terminating semicolons.  The struct used in the typedef needs to be followed by either a tag, with a declaration for the members of that tagged struct visible somewhere else, or else a braced set of member declarations.  In other words, I think the problem is in your C code itself, not in CCS.
      The attempt to use "packed" structures (with possibly improperly aligned members) is scary, but you can deal with that after you have compilable code.
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • peter lagergren
      Posted by peter lagergren
      on Jun 11 2012 11:22 AM
      Intellectual985 points

      Sorry about the confusion - I just didn't bother to copy the entire struct. Here's the entire code:

      #ifdef __CCS__
      typedef struct __attribute__ ((__packed__)) _handles_descriptor_t
      #elif __IAR_SYSTEMS_ICC__
      #pragma pack(1)
      typedef struct _handles_descriptor_t
      #endif
      {
      unsigned char handle;
      unsigned char block_mode;
      unsigned short free_bufs;
      } handles_descriptor_t;

      which is terminated by a ;

      There are a number of these files that TI supplies for the EXP430FR5739 experimental board. The architecture is that there are a number of TCP/IP related files that are  compiled and linked into .lib libraries and then linked into the source. Because the .lib files are first in the hierarchy of the build, following the include files for the processor, they do get linked in before the main() code gets compiled.

      I still haven't formed any insight into why my debugger won't run to main(). Grrrrrrrr.

      Peter

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Archaeologist
      Posted by Archaeologist
      on Jun 11 2012 12:16 PM
      Mastermind40850 points

      Object libraries don't get linked into the final executable until the final link.  All compilation must be completed before the final link, so main gets compiled before libraries get linked in.  However, I don't think this is relevant to your issue.

      Are you sure the program actually got loaded?  If you look at the address of main in the disassembly window, does it look like real assembly code?

      What happens if you set a breakpoint in _c_int00 and attempt to load and run?

      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