Hello everyone! I am using CW V4.6 for HCS12(X)
If I want to move something (const or variable) to GLOBAL memory, I have to put pragmas covering the declaration AND the definition.
If I miss one of this pragmas, I mean, if I put pragmas in the declaration and not in the definition or vice versa, is there any INFORMATION, WARNING or ERROR message that could warn me that that element is not being properly allocated?
Thanks in advance.
Best regards,
hipercadi
CW should produce C4200 warning by default:
[DISABLE, INFORMATION, WARNING, ERROR]
A object (variable or function) was declared with inconsistent segments.
#pragma DATA_SEG A extern int i; #pragma DATA_SEG B int i;
Change the segment pragmas in a way that all declarations and the definition of one object are in the same segment. Otherwise wrong optimizations could happen.