A C coding standard is a set of rules for source code that is adopted by a team of programmers working together on a project, such as the design of an embedded system.  Programming teams and companies write down their C coding standards for a variety of reasons but often bicker internally about which rules to follow.

Barr Group's Embedded C Coding Standard was developed to minimize bugs in firmware by focusing on practical rules that keep bugs out--while also improving the maintainability and portability of embedded software. The coding standard details a set of guiding principles as well as specific naming conventions and other rules for the use of data types, functions, preprocessor macros, variables and much more. Individual rules that have been demonstrated to reduce or eliminate certain types of bugs are highlighted.  In this latest version, BARR-C:2018, the stylistic coding rules have been fully harmonized with MISRA C: 2012, while helping embedded system designers reduce defects in firmware written in C and C++.

Printed Copies

You can order bound paperback copies of the BARR-C:2018 at Amazon.com.

Free PDF Download

Alternatively, you can download a free PDF of Embedded C Coding Standard. Beware though you are never permitted to post your copy of the PDF on the Internet nor share it with others outside of your company.

Online HTML Version

What follows is a browser-friendly copy of the Embedded C Coding Standard, in HTML format.

If you are a follower of any similar coding standard, we encourage you to participate in the comments on these pages as well as to join the Embedded C/C++ Coding Standards LinkedIn group.

Table of Contents

Comments:

The Barr Group website contains a number of related articles about coding standards that may also be of interest.