Hi guys,
I tried making a project with .c,.cpp and .asm files and the processor expert would not be included in the project! Is there a way to add the processor expert files into it?
I tried file -> New -> other -> processor expert -> enable processor expert for existing C project and it successfully added Device initialization component to the project but when I compiled I got the following errors
Description | Resource | Path | Location | Type |
C1834 Indirection applied to non-pointer | MCUinit.c | /DZ128_work/Sources | line 154 | C/C++ Problem |
C2450 Expected: . * + - & ! ~ ++ -- -> [ ( :: IDENT CONSTANT STRING sizeof __alignof__ __va_sizeof__ __va_arg_type__ delete new throw | MCUinit.c | /DZ128_work/Sources | line 154 | C/C++ Problem |
C2801 ')' missing | MCUinit.c | /DZ128_work/Sources | line 154 | C/C++ Problem |
mingw32-make: *** [Sources/MCUinit_c.obj] Error 1 | DZ128_work | C/C++ Problem |
Please advise
Regards
K
Hello,
Processor Expert generated code is plain C code, and cannot be compiled in C++ mode.
Make sure you compile all Processor Expert files in C mode.
Additionally, this article might help: Processor Expert, gcc C++ and Kinetis-L with MQXLite | MCU on Eclipse
(although I see you are using S08, but the principles apply to the S08 as well).
It is much easier if you create a project with Processor Expert and C, and then add your C++ files to it (and compile them in C++ mode). The only thing you need to be careful is that you make sure you call your global constructors (or add that to the startup code). If you are not constructing global objects, then this is not necessary.
Hope this helps,
Erich