Skip to main content

The Right Start

  • Chapter
  • First Online:
Real-Time C++
  • 3226 Accesses

Abstract

The startup code is called by the microcontroller hardware after reset and is the first code to execute before calling the

subroutine. The startup code predominantly consists of initialization code and may include, among other things, CPU-initialization, zero-clear RAM initialization, ROM-to-RAM static initialization and static ctor call initialization. The compiler’s default startup code is often tightly bound to the compiler’s runtime libraries and may not be available as source code. In addition, even if the source of the startup code is available, it can be hard to understand because it may be written in assembly and cluttered with a multitude of options required for supporting a variety of chip derivatives. This chapter describes how to implement a custom startup code and its initializations written predominantly in C++, from reset to

.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Barr, Programming Embedded Systems with C and GNU Development Tools, 2nd edn. (O’Reilly, Sebastopol, 2006)

    Google Scholar 

  2. S. Meyers, Effective C++: 55 Specific Ways to Improve Your Programs and Designs, 3rd edn. (Addison-Wesley, Boston, 2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christopher Kormanyos .

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Kormanyos, C. (2015). The Right Start. In: Real-Time C++. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-47810-3_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-47810-3_8

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-47809-7

  • Online ISBN: 978-3-662-47810-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics