User`s guide
Pragmas for the DSP56800 and DSP56800E
Pragma Reference
385Targeting MC56F83xx/DSP5685x Controllers
Listing C.7 Example of Enumerations the Same as Size as int
enum SmallNumber { One = 1, Two = 2 };
/* If you enable enumsalwaysint, this type is
the same size as an int. Otherwise, this type is
short int. */
enum BigNumber
{ ThreeThousandMillion = 3000000000 };
/* If you enable enumsalwaysint, the compiler might
generate an error. Otherwise, this type is
the same size as a long int. */
This pragma corresponds to the Enums Always Int setting in the C/C++ Language
panel. To check this setting, use __option (enumsalwaysint), described in
Checking Settings
. By default, this pragma is disabled.
Note
The size of a char on the DSP56800 target is 16 bits, and 8 bits on the DSP56800E.
explicit_zero_data
Controls the section where zero-initialized global variables are emitted.
Prototype
#pragma explicit_zero_data on | off | reset
Remarks
If you enable this pragma, zero-initialized global variables are emitted to the .data
section (which is normally stored in ROM) instead of the .BSS section. This results in
a larger ROM image. This pragma should be enabled if customized startup code is
used and it does not initialize the .BSS section. The .BSS section is initialized to zero
by the default CodeWarrior startup code.
This pragma does not correspond to any setting in the C/C++ Language
panel. To
check this setting, use __option(explicit_zero_data), described in
Checking Settings
. By default, this pragma is disabled.