Netrino's Embedded C Coding Standard was developed from the ground up 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 (more below) as
Embedded C Coding Standard
β Scribed by Michael Barr
- Publisher
- CreateSpace Independent Publishing Platform
- Year
- 2018
- Tongue
- English
- Leaves
- 87
- Edition
- BARR-C:2018
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Barr Group's Embedded C Coding Standard was developed to help firmware engineers minimize defects in embedded systems. Unlike the majority of coding standards, this standard focuses on practical rules that keep bugs out - including techniques designed to improve the maintainability and portability of embedded software. The rules in this coding standard include 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 other C language constructs. Individual rules that have been demonstrated to reduce or eliminate certain types of defects are highlighted. The BARR-C standard is distinct from, yet compatible with, the MISRA C Guidelines for Use of the C Language in Critical Systems. Programmers can easily combine rules from the two standards as needed.
β¦ Table of Contents
Document Licence
Introduction
1 General Rules
1.1 Which C?
1.2 Line Width
1.3 Braces
1.4 Parentheses
1.5 Common Abbreviations
1.6 Casts
1.7 Keywords to Avoid
1.8 Keywords to Frequent
2 Comment Rule
2.1 Acceptable Formats
2.2 Locations and Content
3 White Space Rules
3.1 Space
3.2 Alignment
3.3 Blank Lines
3.4 Indentation
3.5 Tabs
3.6 Non-Printing Characters
4 Module Rules
4.1 Naming Conventions
4.2 Header Files
4.3 Source Files
4.4 File Templates
5 Data Type Rules
5.1 Naming Conventions
5.2 Fixed-Width Integers
5.3 Signed and Unsigned Integers
5.4 Floating Point
5.5 Structures and Unions
5.6 Booleans
6 Procedure Rules
6.1 Naming Conventions
6.2 Functions
6.3 Function-Like Macros
6.4 Threads of Execution
6.5 Interrupt Service Routines
7 Variable Rules
7.1 Naming Conventions
7.2 Initialization
8 Statement Rules
8.1 Variable Declarations
8.2 Conditional Statements
8.3 Switch Statements
8.4 Loops
8.5 Jumps
8.6 Equivalence Tests
Appendix A: Table of Abbreviations
Appendix B: Header File Template
Appendix C: Source File Template
Appendix D: Example Program
Bibliography
π SIMILAR VOLUMES
Barr Group's Embedded C Coding Standard was developed from the ground up 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 book details a set of guiding principles as wel
Barr Groupβs Embedded C Coding Standard was designed specifically to reduce the number of programming defects in embedded software. By following this coding standard, firmware developers not only reduce hazards to users and time spent in the debugging stage of their projects but also improve the
This document describes rules and recommendations for developing applications and class libraries using the C#<br/>Language. The goal is to define guidelines to enforce consistent style and formatting and help developers avoid common<br/>pitfalls and mistakes.<br/>Specifically, this document covers