C++ Programming Guides and Docs
Here are six C++ programming tutorial and learning
documents, with several related to embedded and portable
device development. Also
included below are three other documents, two of which cover embedded Linux
development on a Windows host. All of these C++ documents are hosted by
appinf.com.
C++
Coding Style Guide: Rules and Recommendations
Version 1.3 (52 pages, 392kb, pdf format)
Table of Contents:
1. Introduction
2. Terminology
3. General Recommendations
4. Source Files and Project Structure
5. Names
6. Style
7. Classes
8. Class Templates
9. Functions
10. Constants
11. Variables
12. Pointers and References
13. Type Conversions
14. Flow Control
15. Expressions
16. Memory and Resources
17. Namespaces
18. Error Handling
19. Portability
20. References and Recommended Reading
21. Appendix: Documentation
22. Appendix: Abbreviations
Cross-Platform
Issues With Floating-Point Arithmetics in C++
Günter Obiltschnig, ACCU Conference 2006 (7 pages, pdf format)
The C++ standard does not specify a binary representation for the
floating-point types float, double and long double. Although not
required by the standard, the implementation of floating point
arithmetic used by most C++ compilers conforms to a standard, IEEE
754-1985, at least for types float and double. The degree to which the
various compilers implement all the features of IEEE 754 varies. This
creates various pitfalls for anyone writing portable floating-point
code in C++. These issues, and ways how to work around them, are the
topic of this paper.
Designing
and Building Portable Systems in C++
Günter Obiltschnig (16 pages, pdf format)
C++ covers the whole range from low-level to high-level programming,
making it ideally suited for writing portable software. However, code
portability is often neglected in embedded systems engineering. With
software becoming ever more complex, and hardware becoming ever more
interchangeable, this oversight can turn into a problem when software
must be ported to a new platform. This paper shows tools and techniques
to design and build portable software in C++. It shows how to use C++
features to encapsulate platform-dependent parts
(compiler/language differences, operating system interfaces,
input/output) of programs, thus ensuring portability of the resulting
system.
Using
C++ to Create Better Device Software
Günter Obiltschnig (12 pages, pdf format)
Software for embedded systems is becoming ever more
complex. Object-oriented software development is a proven
solution
for taming software complexity. While, at least to a certain degree,
object-oriented principles can also be applied to C programming, a
programming language with inherent support for object-oriented
programming brings many advantages. But support for object-oriented
programming is just one feature of C++. C++ has many features that make
writing reliable and robust code easier than in C. This paper
introduces two ANSI C++ techniques that can be used to write more
reliable and robust code for embedded systems. These are the RAII
(Resource Acquisition Is Initialization) idiom for resource management
and exceptions for error handling.
C++
for Safety-Critical Systems
Günter Obiltschnig (5 pages, pdf format)
C++ is now widely used in the development of software for embedded
systems, even safety-critical and hard-real-time systems. Even if, due
to their design, other programming languages may be better suited for
the development of safety-critical systems, there are other relevant
factors in favor of C++. Examples are availability of skilled
developers and tool support. The public release of the C++ coding
standard used in that project (JSF C++), has certainly increased the
interest in using C++ for safety-critical systems. In June 2008 the
MISRA C++ standard "Guidelines for the use of the C++ language in
critical systems" has been released by the Motor Industry Software
Reliability Association. Similar to the JSF C++ standard, the MISRA C++
standard defines rules, as well as a "safe" subset of the C++ language
for the development of safety-critical systems. This paper gives an
overview of both the JSF C++ and MISRA C++ standards and also looks in
detail at some of their rules and the rationale behind them. It also
shows where both standards differ.
The
POCO C++ Libraries for Device Software Development
Version 2.0 (19 pages, pdf format)
This
document gives an overview of the Applied Informatics POCO C++
Libraries, a collection of class libraries and frameworks that greatly
simplifies the development of network-centric and platform-independent
applications in C++. The document is targeted at developers and
development/technical managers wanting to get an overview of the
functionality and features offered by the Applied Informatics POCO C++
Libraries. Familiarity with the C++ programming language is assumed.
Using
Eclipse to Develop for Embedded Linux on a Windows Host
Dr Peter Schojer (8 pages, pdf format)
Eclipse
is an open-source software framework written primarily in Java. While
originally only aiding the Java developer, the CDT (C++ Development
Tools) add-on provided support for C/C++ projects, syntax highlighting
and debugging. CDT relies on a GNU tool chain which must be provided
and integrated into Eclipse by the user and on Cygwin as the underlying
Unix emulation layer to function properly. This paper will first show
how to install all the software required starting with Cygwin. We will
then show how to create a cross compiler of your own with Cygwin. The
next section covers the installation of Eclipse with additional plugins
required for software development. This include subversion access,
remote shells and remote debugging. Finally, we will show how one can
use Eclipse for remote debugging.
Developing
for Embedded Linux on Windows
(33 slides, pdf format)
Overview:
- Motivation
- Required Software
- Creating a Cross Compiler
- Eclipse
- Debugging With Eclipse
- Summary
Automatic Configuration and Service Discovery for Networked Smart
Devices
Günter Obiltschnig, Electronica Embedded Conference Munich 2006
(8 pages, pdf format)
This
paper discusses the fundamental issues in automatic configuration and
service discovery – address assignment, name
resolution, service discovery, service description,
service
invocation and service presentation. Then, four popular technologies
that solve some or all of these issues are presented – Zero
Configuration Networking, Universal Plug and Play, Jini and JXTA.
Popularity: 3% [?]
Related Posts:
Tags for this post>> C++ Courses and Tutorials
