From WikiChip
c/embedded
< c
Revision as of 01:50, 15 December 2013 by David (talk | contribs) (Created page with "'''Embedded C''' formally known as '''Programming languages - C - Extensions to support embedded processors''' is a technical reported approved by ISO for publication which sp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Embedded C formally known as Programming languages - C - Extensions to support embedded processors is a technical reported approved by ISO for publication which specifies a series of extensions of the C programming language. The technical reported as been published as ISO/IEC TR 18037.

The technical report covers three separate clauses: fixed-point arithmetic, named address spaces and named-register storage classes, and basic I/O hardware addressing. Because this is a technical report, implementations are free to pick and choose the features they want to support. The technical report does encourage implementations that select one of the clauses to fully support the entire clause.

History

The first edition of the technical report was published in 2004 as ISO/IEC TR 18037:2004. The second edition of the technical report was consequently published in 2008 as ISO/IEC TR 18037:2008.

Headers

The technical report added 2 new headers: <stdfix.h>, and <iohw.h>.

Fixed-point arithmetic

Main article: Fixed-point arithmetic - C

The technical report introduced fixed-point data values, either as fractional data values or as integral part and a fractional parts. Fixed-point data are designated with the new _Fract and _Accum keywords. The _Sat specifier can be used to specify a saturating fixed-point type. A convenient version of these keywords are defined in <stdfix.h>. The header also includes a set of new fixed-point arithmetic operation support functions.

Named-Register Storage Classes

The technical report added the ability to access processor registers that are not addressable in any of the machine's address spaces. Such ability is often required in embedded processors that perform special operators. The technical report added the ability to name the register after the register keyword.

Basic I/O Hardware Addressing

The technical report added support for accessing hardware I/O functionality of the embedded device via the new <iohw.h> header. The name of the I/O-register designators must be provided by an implementation in a header of their choice. Additionally, the _Access keyword was added to associate the address, the memory space and the access limits to a C declaration.

External Links