Embedded C++: an Overview

Embedded C++: an Overview

by P.J. PLAUGER Embedded C++: An Overview Is EC++ the diet pill that will shrink C++ down to size for embedded applications? Here’s P.J. Plauger’s take. he Fall 1997 Embedded trary, I found growing enthusiasm on Systems Conference in several fronts. San Jose was a smashing success. Attendance was ■ The Embedded C++ Technical way up over last year, and Committee, a consortium of rather more than even the optimistic Japanese companies, held their Tprojections made by the Powers that third international meeting on Be before the conference opened. I September 30, across the street haven’t seen this much activity and from the convention center. About interest in the embedded marketplace 50 people showed up, many of them ever before. Period. vendors announcing new products Of particular interest to me was the that support this de facto industry attention awarded to Embedded C++. standard. Several major Japanese It was only a year earlier, at the Fall companies have also joined the 1996 Embedded Systems original four semiconductor heavy- Conference, that I had the honor of hitters as well P.J. Plauger is the author of the stan- formally introducing this project to ■ I repeated my talk on Embedded dard C++ library shipped with the public. It could have sunk without C++ on October 1 to an audience of Microsoft Visual C++. His “State of a trace in the intervening months— at least 150 people. There was obvi- the Art” column appears monthly in many optimistic new projects do— ous interest and lots of intelligent Embedded Systems Programming. but that didn’t happen. Quite the con- questions ■ Green Hills Software is now mar- Moving a C++ caught up. keting their embedded compiler It gets worse, at least from the stand- products with full EC++ support program between point of embedded systems program- ■ Metrowerks and Hiware, two other ming. Several of the new features add companies that license compilers significant overheads to a C++ pro- into the embedded marketplace, compilers has gram, in terms of both code size and announced their intention to supply execution speed. In some cases, the compilers that support Embedded become more overheads occur even if you don’t C++ in the near future explicitly make use of the new fea- ■ I talked to half a dozen exhibitors difficult, not less, tures. Customers aren’t asking for on the show floor who already knew these new features—at least, they about Embedded C++ and were haven’t yet been educated en masse to beginning to plan how to support it as a result of want the features—and the chip ven- for their customers dors haven’t gotten around to imple- standardization. menting all of them. Compiler devel- I’ll elaborate on these themes in the opment in the commercial world is dri- remainder of this article. But first, let ven by what customers are asking for me back up and supply a bit of history. All four companies shared a com- this month. There’s simply too many I can then fill in the relevant technical mon complaint. Their customers— things to do to devote product develop- details. (See also the sidebar, “Read almost all developers of embedded ment time in places that don’t confer All About It,” for a supplemental read- systems using their chips—were an immediate competitive advantage. ing list.) beginning to demand C++ compilers. Thus, some of the chip vendors Naturally, the vendors were eager to might love to have an excuse not to HISTORY oblige. All four companies offered have to supply, say, exception han- first heard of this project in some form of a C++ compiler, or were dling in C++. Many of their customers November 1995, while attending a about to. But when customers started would happily live without such a fea- meeting of WG21 and J16, the ISO using C++, they were largely dissatis- ture, at least for the more demanding Iand ANSI committees standardizing fied. They were accustomed to C, had embedded programming projects. And C++. Advanced Data Controls Corp. learned to deal with its complexities once the customers discover the over- (ADaC) is a Japanese company with over assembly language, and had heads associated with exception han- whom I’ve done business since their learned to accept its overheads. They dling, they may well want to avoid founding in 1982. My friends at ADaC were nevertheless surprised and those overheads even if the compiler urged me to extend my stay to attend a amazed at the added complexities and does support the feature. Equally, the Friday evening meeting they had overheads of C++. chip vendors don’t want to be stigma- arranged. Given the warmth and past On top of everything else was the tized. If the guy down the block sells a success of our business relationship, I dialect problem. C++ has been chang- compiler with some sexy feature, it’s didn’t hesitate to rearrange my travel ing rapidly and steadily for years. hard to make a case for not providing it plans and attend. “Standardization,” a process that nor- as well. Put simply, the vendors face a The meeting was astonishing. In mally stabilizes a programming lan- common software dilemma: how do addition to the folks from ADaC and a guage, began in 1989. But in the case you make sure that what the customers couple of fellow Americans, the atten- of C++, the standardization process think they want is also close to what dees included software people from the has been used as an opportunity to add they really need? four major Japanese semiconductor significant new capabilities to the lan- A popular solution to such a prob- manufacturers—Fujitsu, Hitachi, guage before it freezes. Multiple inher- lem is to define a suitable subset. In NEC, and Toshiba. These were the itance, exceptions, templates, and a this case, we’re talking about a subset folks responsible for providing soft- host of other major features have been of the full language and library man- ware development tools to their cus- added over the past seven years or so, dated by the draft C++ Standard. tomers. They were all wrestling with far faster than compiler writers can Include in the subset everything that what to do about C++, and they were keep up. As a consequence, every meets the need of embedded systems very frank about their problems. I have commercial C++ compiler implements programmers. Omit anything that personally never witnessed such an a different collection of language fea- arguably can be left out, either because open dialog between nominal competi- tures. Moving a C++ program between it adds to overheads, or it’s too new to tors, certainly not among American compilers has become more difficult, be widely available, or for some other companies. But then, we Americans not less, as a result of standardiza- good and proper reason. Get a bunch of enjoy a richer fabric of antitrust laws, tion—at least during this transitional people to agree on the subset. If sever- to keep companies from collaborating period before the draft C++ Standard al vendors supply the same subset, cus- unfairly. Or fairly, for that matter. finally settles down and everyone gets tomers can write C++ code that is both Embedded C++ efficient and portable across multiple Dr. Kiichiro Tamaru of Toshiba By September 1996, the Embedded implementations. Gone is much of the became vice secretary. ADaC is the C++ Technical Committee had pro- stigma for having less than a full secretariat. We Americans are merely duced a draft specification for their implementation. In its place is, in fact, advisers to the committee, which is subset. They even had a Web site up the cachet of matching a useful stan- very much a Japanese undertaking. and running. (See www.caravan.net/ dard, even if it’s only a de facto indus- The kickoff meeting was conducted ec2plus.) As I indicated earlier, I got to try standard. mostly in English, as a courtesy to us make the first public announcement at Thus was born the idea of Americans, who are notoriously weak the Fall 1996 Embedded Systems Embedded C++ (or EC++, for short) as at discussing technical matters in Conference. The project was out from a dialect aimed squarely at the needs of Japanese. Subsequent meetings were under wraps and into the marketplace. embedded systems programmers. The held in Japanese, rather more efficient- group that first came together that ly for the attendees I might add, THE EC++ LANGUAGE Friday night in Tokyo soon dubbed throughout much of 1996. The com- he Embedded C++ specification itself the Embedded C++ Technical mittee maintained a reflector, and did a is a proper subset of the full Committee. Hiroshi Monden of NEC heckuva lot of work between meetings, draft C++ Standard. Thus, the became chair of the committee, and in the bargain. Tmost economical way to describe it is READ ALL ABOUT IT often in terms of what it doesn’t have. I could list all the rules for writing dec- I’ve been writing about C++ and embedded systems for over five years now, both in larations, statements, and expressions, Embedded Systems Programming and in our sister publication, C/C++ Users Journal. For for instance. That might reassure peo- additional detail and considerably more background on the development of Embedded C++, ple who love detail that all the things you might want to review some of these essays. Most are available on CD-ROMs from they value about C++ (and C) are still Miller Freeman. there. But perspective is often lost in details.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us