C++ output to C

This is a discussion on C++ output to C within the C++ Programming forums, part of the General Programming Boards category; I write C in the embedded area; I don't know C++ but would like to use the language. Is there ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    2

    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
    Posts
    470
    You might want to try http://www.comeaucomputing.com/

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,592
    Or even GCC
    http://gcc.gnu.org/onlinedocs/gcc-3....bmodel-Options

    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    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, 02:08 PM
  3. Replies: 4
    Last Post: 11-30-2005, 03: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, 04:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21