AnsweredAssumed Answered

Adding C++ files to CW for MCUs

Question asked by al on Oct 25, 2012
Latest reply on Oct 29, 2012 by Monica Arvizu

After years of working with HCS12 processor and the associated code warrior IDE, we are moving up to the Kinetis K10.

I have been evaluating CW v10.2.  Started out with processor expert to get some basics working.

So, now I attempt to port over some C++ code from our previous HCS 12 project and it fails to compile with these C++ files no matter what I try.

 

1.  Had to rename files from .c to .cpp - (not required on HCS12 compiler - but not a big deal).

2.  Changed Model to ewl_C++ in Librarian and made sure it was in the path.

 

Still stuck on "undefined identifier 'class'".

 

Selected "Force C++ compilation" and it finally seems to compile.  But then I get linker error - >Undefined : "__thumb_startup()".

 

What am I missing?  Doesn't seem like it should be this hard to add in some C++ files to a project.  Don't remember having to do anything special on the HCS12 compiler to make it work.  Thinking about giving IAR or Keil at try??

Outcomes