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.

[参考译文] 编译器/DRA756:ARP32 CGTv 1.0 8可变属性支持:打包

Guru**** 2578945 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/598044/compiler-dra756-arp32-cgtv1-0-8-variable-attribute-support-packed

部件号:DRA756

工具/软件:TI C/C++编译器

您好,

在SPRUH24A (ARP32编译器指南)中,"packed"属性似乎可能受支持。

5.13 Tm3变量属性

支持以下变量属性:aligned,deprecated,mode,packed,section,

Transparent_union,unused,used和weak。

所用属性在GCC 4.2 中定义(请参阅 http://gcc.gnu.org/onlinedocs/gcc-GCC.4/gcc/Variable- 4.2

attributes.html#Variable-Attributes)。

结构和联合类型的打包属性仅在有硬件支持时可用

未对齐的访问。 这意味着--unaligned_access-=on时,它默认为Cortex

设备(A8,R4,M3,M4)。

尝试时,会出现编译错误:

 

错误#1167:“结构名称_结构”的属性无效

 另外,-unaligned_access-=on是无效的编译器选项。  假设ARP32不支持“压缩”。  这些文档并未完全说明这一点,但假设核心不支持不一致的访问。

请您确认这一点吗?

谢谢!
Eric

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这是文档中的错误。  仅ARM,MSP430和某些版本的C6000支持packed属性。 在ARM和MSP430上,即使没有用于不对齐访问的硬件支持,打包的支持也可用。