A decimal number
(1 or 2) enclosed in
parentheses.
Default
PACK(2)
µVision
Options — C166 —
Misc Controls.
Description
The PACK directive causes the compiler to generate
byte-aligned or half-word-aligned structures. This is useful when
exchanging data with other systems where no alignment is
required.
Note
The compiler generates considerably more code to access
byte-aligned words. For this reason, PACK(1) should be
used only when necessary.
By default, the compiler assumes that structure members are
aligned on word boundaries. If you use PACK(1) some
structure members may be aligned on byte boundaries. The
BYTEALIGN directive supports pointers to structure members
that are aligned on byte boundaries.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.