m |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{c title|Embedded C}}{{C standards}} | ||
'''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|C programming language]]. The technical reported as been published as '''ISO/IEC TR 18037'''. | '''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|C programming language]]. The technical reported as been published as '''ISO/IEC TR 18037'''. | ||
Line 7: | Line 8: | ||
== Headers == | == Headers == | ||
− | The technical report added 2 new headers: | + | The technical report added 2 new headers: {{C|stdfix.h|<stdfix.h>}}, and {{C|iohw.h - C|<iohw.h>}}. |
== Fixed-point arithmetic == | == Fixed-point arithmetic == | ||
− | {{main|Fixed-point arithmetic | + | {{main|c/fixed-point arithmetic|l1=Fixed-point arithmetic}} |
− | 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 | + | 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 {{C|_Fract}} and {{C|_Accum}} keywords. The {{C|_Sat}} specifier can be used to specify a saturating fixed-point type. A convenient version of these keywords are defined in {{C|stdfix.h|<stdfix.h>}}. The header also includes a set of new fixed-point arithmetic operation support functions. |
== Named-Register Storage Classes == | == Named-Register Storage Classes == | ||
Line 17: | Line 18: | ||
== Basic I/O Hardware Addressing == | == Basic I/O Hardware Addressing == | ||
− | The technical report added support for accessing hardware I/O functionality of the embedded device via the new | + | The technical report added support for accessing hardware I/O functionality of the embedded device via the new {{C|iohw.h|<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 {{C|_Access}} keyword was added to associate the address, the memory space and the access limits to a C declaration. |
== External Links == | == External Links == |
Latest revision as of 06:52, 4 January 2015
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.
Contents
History[edit]
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[edit]
The technical report added 2 new headers: <stdfix.h>, and <iohw.h>.
Fixed-point arithmetic[edit]
- Main article: Fixed-point arithmetic
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[edit]
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[edit]
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.