I am trying to find a way to define structures as packed. For example, in GNU compiler this defined as:
} attributes("packed"); // dont mind the syntax, it is probably mistaken
The question is there anything similar in CCS compiler for DSP?
No. Though work is in progress. Check back in 6-12 months.
Thanks and regards,
TI C/C++ Compiler Forum ModeratorPlease click This Resolved My Issue on the best reply to your questionThe CCS Youtube Channel has short how-to videosThe Compiler Wiki answers most common questionsTrack an issue with SDOWP. Enter your bug id in the Search box.
In reply to George Mock:
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,
In reply to Jochen:
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.
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.
In reply to Paul Knueven:
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.
In reply to Donald McFarland:
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.
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...
In reply to Anders Johansson58793:
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.
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.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.