AnsweredAssumed Answered

classic CW compiler with Eclipse

Question asked by Ron Wilson on Jan 26, 2015
Latest reply on Jun 24, 2015 by James Murray

Since the MCU for Eclipse doesn't support S12XE, I am just using the classic CW compiler (via makefile) with Eclipse CDT.

 

I have configure Eclipse CDT syntax analyzer to use the GNU "Cross GCC" parser. Also, set the #include paths to refer to C:\cw\lib\hc12c\include.

 

But there's a port definition in MC9S12XEP100.h that Eclipse is not seeing. The code compiles correctly and runs, so I assume there is some obscure setting in Eclipse I need to change.

 

The error is: Symbol '_PT01AD0' could not be resolved

 

However, while this problem happens with the real code, my attempts to create a simplified example that demonstrates the problem have failed.

 

Despite that, here is the sample code, anyway:

 

#include <MC9S12XEP100.h>

#define D1_OFF (PT1AD0&=(unsigned char)(~0x01U))

int main(void) {

    D1_OFF;

    return 0;

}

 

The relevant lines in MC9S12XEP100.h:

 

} PT01AD0STR;

extern volatile PT01AD0STR _PT01AD0 @(REG_BASE + 0x00000270);

#define PT01AD0                         _PT01AD0.Word

 

So, the declaration of _PT01AD0 is right before the definition of PT01AD0 so if one is seen, which it clearly is, so should the other.

 

The actual code is structured the same way. I just need some idea what to look for that could cause _PT01AD0 to not be seen while PT01AD0 is seen.

Outcomes