Object attributes
These object attributes are available:
Object attributes that can be used for variables:
__no_alloc,__no_alloc16,__no_alloc_str,__no_alloc_str16,__no_init,__ro_placementObject attributes that can be used for functions and variables:
location,@,__root,__weakObject attributes that can be used for functions:
__absolute,__intrinsic,__nested,__noreturn,__ramfunc,vector
You can specify as many object attributes as required for a specific function or data object.
For more information about location and @, see Controlling data and function placement in memory. For more information about vector, see vector.
Syntax for object attributes
The object attribute must be placed in front of the type. For example, to place myarray in memory that is not initialized at startup:
__no_init int myarray[10];
The #pragmaobject_attribute directive can also be used. This declaration is equivalent to the previous one:
#pragma object_attribute=__no_init int myarray[10];
Note
Object attributes cannot be used in combination with the typedef keyword.