classic CW compiler with Eclipse

cancel
Showing results for 
Search instead for 
Did you mean: 

classic CW compiler with Eclipse

978 Views
rlw
Contributor I

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.

Labels (1)
0 Kudos
6 Replies

277 Views
rlw
Contributor I

Note that commenting out volatile and @(REG_BASE + 0x00000270) did not make a difference. In my real code, Eclipse still did not see  And in my sample code, having them there did NOT  Eclipse from seeing _PT01AD0

Eclipse's "GNU Cross GCC" seems to not care about volatile nor the @ construct.

0 Kudos

277 Views
trytohelp
NXP Employee
NXP Employee

Hi Ron,

I don't think somebody (at Freescale) already tried to integrate S12 tool chain under Eclipse (MCU V10.6 for instance)

On community I've found an interesting post about this question.

      Re: codewarrior and eclipse

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

277 Views
rlw
Contributor I

Up until now, Eclipse CDT with the "default" GNU CrossGCC has had no problem with its built-in source code analysis of my S12XE source files, even "handling" syntax extensions like @(REG_BASE + 0x00000270) without choking. (I do builds with the Classic Codewarrior compiler.)

Maybe a gcc pre-configured for S12X would help, BUT as I am required to use the compiler from the (classic) Codewarrior 4.6 IDE for building, any solution will have to deal with that compiler's expected syntax.

Anyway, when "googling" for "s12x gcc" I see several projects offering a gcc pre-configured for S12X

Is there a "gcc for s12x" you can recommend? Is there one that can handle the syntax for the Codewarrior 4.6 IDE compiler?

Thanks

0 Kudos

277 Views
jsmcortina
Contributor III

I use gcc with S12X. I don't think it will handle the CW syntax as-is though.

http://www.msextra.com/tools

James

0 Kudos

277 Views
trytohelp
NXP Employee
NXP Employee

Hi Ron,

If you want to use another build tool chain than Freescale, you should review the application.

It's really determine the work required.

This will depend how the application was written.

We don't have practice with any S12 GCC.

Now you can refer to the:

      Compiler build tools for Freescale 68hc11, 68hc12, S12, S12X, XGATE (gcc, binutils, newlib)

and to the thread: porting info inside the post ...

      Re: Assembly programmers

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

277 Views
rlw
Contributor I

Thanks. I will see if that helps.


This isn't a build issue (the project must be built using the Classic Codewarrior compiler).

Just that it would be nice if I could get Eclipse CDT's automatic source code analysis to fully handle source written for the Codewarrior compiler.

I have searched for a plug-in to use the Codewarrior compiler for the source analysis, but, the ones I've found don't support the compiler version I need to use.

0 Kudos