Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Embedded in Electronic Design]
C Standards: More Or Less

William Wong  |   ED Online ID #1772  |   December 9, 2002


C and C++ standards keep compiler vendors in line, while system and application developers appreciate the portability aspects. But embedded developers de-mand more and sometimes less than what the standards specify.

These days, DSP developers use C and C++ more often than not, and DSP architectures tend to support C and C++. There isn't much conflict for integer or floating-point DSP support, but fixed point is another matter. Here, DSP-C extensions come into play. A fixed-point data type is added on top of other memory- and device-related features.

Many companies have tried to address the fixed-point problem with varying degrees of success. Motorola utilizes C macros and function definitions, which offers the advantage of working with most C compilers. As a result, the same technique can be used with Motorola's compilers, or third-party compilers.

Of the various extensions, DSP-C looks to be the best bet as a new ISO standard (see "DSP-C 'Fix-Points' C," p. 71). Check out Technical Report No. 18037. MISRA C (The Motor Industry Software Reliability Association) and Embedded C++ (EC++) are subsets of C and C++, respectively. ISO standardization may not be right around the corner, but both are de facto standards.

Many programmers despise subsets, but MISRA C and EC++ are really needed. MISRA C is designed to improve reliability and safety. That's a tough job for a language where shooting one's own foot is a common pastime. EC++ is designed to reduce the execution footprint for C++ applications. C++ features added to C (e.g., templates and exception handling) are invaluable in most situations. Still, they add overhead. EC++ attempts to streamline C++.

C and C++ compilers, especially those targeted for embedded systems, support one or more of these standards. Although it's nice to have options, which one do you choose? More or less?


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • C Tools Accelerate HDV Development On Xilinx FPGAs
  • A New Design Inflection Point
  • Forecasting Industry Growth For 2009 And Beyond
  • EDA Retools To Exploit Multicore Architectures
  • Design And Verification Move Up In Abstraction
  • EDA Retools To Exploit Multicore Architectures
  • A New Design Inflection Point
  • Design And Verification Move Up In Abstraction
    1) Transportation Guidelines For Lithium Batteries Get Updated
    (1263 views today)
    2) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (285 views today)
    3) WHITE PAPER: Liquid-Level Monitoring Using a Pressure Sensor
    (224 views today)
    4) 1-A Switching Regulators Operate With 96% Efficiency To Replace Linear Regulators
    (148 views today)
    5) The Field Of Energy Harvesting Begins To Ripen
    (109 views today)
    ALL TOP 20



    Reader Comments

    fine

    Anonymous -July 01, 2008

    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Web Seminar
    Sponsored By:
    Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
    Speakers: 
    Date: 07/01/08
    Register: 

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources