Embedded C Coding Standard
Book information
Description
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. 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 books
Remembering Bulldog Turner: Unsung Monster of the Midway
2013 · PDF
Who’s Afraid of China?: The Challenge of Chinese Soft Power
2011 · PDF
Journal of Comparative Literature and Aesthetics
2022 · PDF
Remembering Bulldog Turner: Unsung Monster of the Midway
2020 · EPUB
Embedded C Coding Standard
2009 · PDF
Embedded C Coding Standard
2018 · PDF
Acyclic Models
2017 · PDF
Programming Embedded Systems with C and GNU Development Tools
2007 · PDF