C++ output to C
I write C in the embedded area; I don't know C++ but would like to use the language. Is there any C++ compiler that would generate ANSI C code that I could then compile with my compiler to produce code for my applications? I don't know of a C++ compiler for the Freescale (Motorola) microcontrollers but would like to know of one if it exists.
I checked the posts but did not find this answer. So basically I am looking for a way to use C++ with the HC12 processor.
Or even GCC
Lists the "M68hc1x Options" as one of the supported processors.
Just be careful!
You need a good compiler/IDE with some good tools. With an embedded system, it's usually important to know exactly what's going on with the memory, stack, CPU registers, etc. Every embedded system has a different hardware configuration, so your development system should be specifically designed for embedded work.
You are taking a risk if you use a compiler that's not approved by the microcontroller manufacturer. If your system has an operating system, the operating system provider is usually the best source for a compiler.