Using CW 10.2, I've figured out how to create and locate a "section" in order to place variables, as such ...
#pragma force_active on
#pragma define_section version ".version" far_abs R
#pragma section version begin
__declspec( version ) const U16 fwMajor = SOFTWARE_VERSION_MAJOR;
__declspec( version ) const U16 fwMinor = SOFTWARE_VERSION_MINOR;
__declspec( version ) const U16 fwBuild = SOFTWARE_VERSION_BUILD;
__declspec( version ) const U16 fwRevision = SOFTWARE_VERSION_REVISION;
#pragma section version end
When I inspect the MAP file, the constants are placed where expected ( as defined in my LCF file ). The order of the constants, however, is not the same order as they appear in their declaration.
Question: Is there another pragma or attribute that can be used to keep the order of variables within a section the same as their declaration order ?