In my actual code, I am using the #pragma LOCATION and RETAIN directives with over 7000 variables. Example code with #pragma LOCATION and RETAIN directives is shown below. The compiler doe sn't catch the variable redefinition for this situation. int xyz; #define BASE 0xB000 #pragma LOCATION(abc,BASE+7000) #pragma RETAIN(abc) int abc; #pragma LOCATION(abc,BASE+8000) #pragma RETAIN(abc) int abc; int main(void) { abc++; xyz = abc; return 0; }
↧