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.

Compiler/DRA756: ARP32 CGTv1.0.8 Variable Attribute Support: Packed

Part Number: DRA756

Tool/software: TI C/C++ Compiler

Hi,

In SPRUH24A (ARP32 Compiler Guide), it looks like the "packed" attribute is potentially supported.

5.13.3 Variable Attributes

The following variable attributes are supported: aligned, deprecated, mode, packed, section,

transparent_union, unused, used, and weak.

The used attribute is defined in GCC 4.2 (see http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Variable-

Attributes.html#Variable-Attributes).

The packed attribute for structure and union types is available only when there is hardware support for

unaligned accesses. This means when --unaligned_access=on, which it is by default for the Cortex

devices (A8, R4, M3, M4).

When attempted, a compilation error occurs:

 

error #1167: invalid attribute for "struct name_of_struct"

 Also, -unaligned_access=on is an invalid compiler options.  The assumption is that "packed" is not supported on the ARP32.  The docs do not make this entirely clear, but the assumption is that the core does not support unaligned access.

Can you please confirm this?

Thanks,
Eric