• 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 » TI C/C++ Compiler » TI C/C++ Compiler - Forum » Packed structures
Share
TI C/C++ Compiler
  • Forum
Options
  • Subscribe via RSS

Packed structures

Packed structures

This question is answered
Arye Lerner
Posted by Arye Lerner
on Mar 16 2010 04:30 AM
Expert1130 points

Hello,

 

I am trying to find a way to define structures as packed. For example, in GNU compiler this defined as:

struct name

{

int one;

int two;

...

} attributes("packed");      // dont mind the syntax, it is probably mistaken

 

The question is there anything similar in CCS compiler for DSP?

Thank You

Arye Lerner

packed
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • George Mock
    Posted by George Mock
    on Mar 16 2010 09:38 AM
    Verified Answer
    Verified by Arye Lerner
    Guru51565 points

    No.  Though work is in progress.  Check back in 6-12 months.

    Thanks and regards,

    -George

     


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question.
    The Compiler Wiki answers most common questions.
    Track an issue with SDOWP. 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.
  • Jochen
    Posted by Jochen
    on Jul 08 2010 03:05 AM
    Prodigy50 points

    Well, 6 month have not yet gone by,

    but is there any news about when this feature (packed structs) will be available?

     

    Thanks a lot,

    jochen

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Mock
    Posted by George Mock
    on Jul 08 2010 07:29 AM
    Guru51565 points

    The ARM compiler as of version 4.6.1 does support the GCC packed attribute.  There are limitations.  Chief among them is you must build for Cortex-M3.  Check the readme for all the details.

    Work is in progress on other compilers.

    Thanks and regards,

    -George

     


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question.
    The Compiler Wiki answers most common questions.
    Track an issue with SDOWP. 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.
  • Paul Knueven
    Posted by Paul Knueven
    on Aug 31 2010 11:21 AM
    Expert4280 points

    An update...

    The ARM v4.7.x compilers support packed for all Cortex (M3, R4, A8) devices when --unaligned_access=on (which is the default for Cortex devices).

    The C6x v7.2.x compilers (due out sometime around the end of the year) will support packed.

     

    packed
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Donald McFarland
    Posted by Donald McFarland
    on Sep 17 2010 14:07 PM
    Prodigy140 points

    Hi Paul,

     

    I just inherited some code that we want to run on an MSP430. In particular, the code is an E!A485 based communications application which has a large number of data structures which define the packets. As with all communications protocols, this one does not allow padding in the data packets. As far as I can tell, Code Composer Studio support for MSP430 does not include packed data structures, not even the latest release of CSS seems to have this feature.

     

    The project deadline is 12-17-10, and without packed data structures, we will have to use a different chip (non-TI) or a different IDE for the MSP430, if one exists which has support for the packed data structure. Just so you know, anyone who is concerned about the readability of a communications based application will not use any of the TI parts for that purpose which do not support packed data structures.

     

    Anyhow, I guess that Im out of luck as far as CCS is concerned - are there any other 3rd party development environments out there which would allow us to use the MSP430 for this communications based project (we don't have the time to re-write the code to get rid of the data structures, and even if we did, that would not be an option for us) ?

    I made the mistake of assuming that CSS's MSP430 C compiler would support packed data structures, as I have never seen a compiler before that did not support them, except for one TI DSP compiler a number of years back, so a fast response to this question would be greatly appreciated as I am holding back progress on this project as a result.

     

    Thanks,

     

    Don McFarland

    donald.mcfarland@honeywell.com

    (920) 342-0683

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Paul Knueven
    Posted by Paul Knueven
    on Sep 17 2010 15:25 PM
    Expert4280 points

    Don,

    TI's MSP compiler v4.0 will support the GNU packed attribute for defining and accessing packed data structures.  However it is currently scheduled for release in mid-2011, so will not meet your deadlines.

    The IAR compiler supports packing with the pragma PACK.

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Anders Johansson58793
    Posted by Anders Johansson58793
    on Oct 20 2010 09:38 AM
    Prodigy20 points

    Paul,

    Do you have a schedule for the TMS320C6x C/C++ Compiler as well?

    I just wrote an elegant piece of code without MISRA warnings and didn't remember to pack until it failed in my debug session...

    /Anders

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Paul Knueven
    Posted by Paul Knueven
    on Oct 20 2010 09:57 AM
    Expert4280 points

    The GCC packed attribute is supported in C6000 Code Generation Tools v7.2.0 due out in 11Q1.  Beta versions may be available as soon as November.

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
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