Two of my variables are overlapped; they occupy the same physical location in RAM. What's wrong?

The compiler has allocated two variables from two different memory spaces that happen to share the same physical locations. The declarations of these memory spaces need to be corrected.

If two named memory spaces (as declared with #pragma memory RAM) share the same or similar parameters, there's a chance that allocations could overlap. Alter the memory space declaration to avoid the overlap.

If one of the variables is not from a named memory location, it's possible that no memory remains unnamed (#pragma memory RAM directives with names occupy the entire RAM address space). In this case, use a name with the variable declaration or alter the #pragma memory RAM declarations to leave some unnamed global memory.

If the overlap is intentional, use the @ syntax in the variable declaration to place variables in the same location as other variables:

char abc;
char def @ &abc;