Thread: C++ output to C

  1. #1
    Registered User
    Join Date
    Mar 2005

    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.

    Thank you

    Robert Lewis

  2. #2
    Registered User
    Join Date
    Aug 2003
    You might want to try

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Or even GCC

    Lists the "M68hc1x Options" as one of the supported processors.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001

    Exclamation 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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. code output...
    By roaan in forum C Programming
    Replies: 6
    Last Post: 07-03-2009, 02:22 AM
  2. Help for my output array
    By qwertysingh in forum C Programming
    Replies: 1
    Last Post: 02-17-2009, 03:08 PM
  3. Replies: 4
    Last Post: 11-30-2005, 04:44 PM
  4. Formatting output into even columns?
    By Uncle Rico in forum C Programming
    Replies: 2
    Last Post: 08-16-2005, 05:10 PM
  5. Output problems with structures
    By Gkitty in forum C Programming
    Replies: 1
    Last Post: 12-16-2002, 05:27 AM