This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

will you deliver a C++51? (No content)

same as the topic.

  • You must be kidding. C++ would chew up almost all of the 8051's resources if any of the good parts of C++ were used.

    Obviously, I'm not speaking for Keil but if you require C++ (ostensibly because you have a large and complicated application) I doubt the 8051 is your best CPU choice.

    You can do rather object-like programming in C, just pretend a module is an object.

    Regards.

    - Mark

  • 15 years ago a lot of the developers told us the same about C. They could not imagine the there could be something other than assembler.

    Tasking already offers a ec++ compiler for the C166-Family (included in the standard package!).

    By
    ...Leo

  • "Tasking already offers a ec++ compiler for the C166-Family..."

    You might want to benchmark the Tasking C++ compiler before jumping in. An evaluation version can be had. My results caused me to buy the Keil tools.

    Classes, inheritence, polymorhism;
    For code which would be more smoothly handled in C++ (screen object handling, com port interfaces, ...) I put in a structure ID member and have a 'this' pointer argument passed in the functions. Is it more work, yes, but at least I see the code and run-time overhead and can eliminate it when it isn't needed.

    Operator overloading;
    Most compilers I have studied handle operator overloading as a function call, possibly using indirect function call tables for the simplest types. The overhead can make simple addition a deadly time-hog.

    Templates;
    In my opinion, templates are the single largest cause of bloated code which is anathema to embedded programming with it's space and time constraints and reliablity requirements.

    PS. To include a 'this' pointer;

    typedef struct CPP_STRUCT {
      struct CPP_STRUCT *p_This;
      ...
      int  (*member_Fcn)(struct CPP_STRUCT *p_This);
    } CPP_STRUCT;
    
    The first tag allows use of the pointer type inside the structure while the last tag acts as a type.

    Best luck

  • No. We currently do not offer a C++ compiler for the 8051. However, CEIBO, has just announced a front-end for the Keil tools. Take a look at:

    http://www.ceibo.com

    Jon