Skip to main content

Working with a Real-Time C++ Program on a Board

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

Abstract

This chapter presents a complete example of building, flashing and executing a microcontroller C++ program using the LED program. The LED program will be built with GCC cross tools in the MinGW/MSYS (MinGW, Home of the MinGW and MSYS Projects, 2012, http://www.mingw.org ) environment. Our target microcontroller is an 8-bit ATMEL® AVR® microcontroller (ATMEL®, 8-bit ATMEL® Microcontroller with 4/8/16/32K Bytes In-System Programmable Flash (ATmega48A, ATmega48PA, ATmega88A, ATmega88PA, ATmega168A, ATmega168PA, ATmega328, ATmega328P), Rev. 8271D-AVR-05/11 (ATMEL®, 2011)). This popular microcontroller has state-of-the-art quality and widespread availability. In addition, there is a well-maintained GCC port for this microcontroller making it well-suited for our example. In the second half of this chapter, we will investigate efficiency aspects and compiler warnings and errors based on the example of the LED program.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. ARDUINO®, ARDUINO® (2015), http://www.arduino.cc

  2. ATMEL®, 8-bit ATMEL® Microcontroller with 4/8/16/32K Bytes In-System Programmable Flash (ATmega48A, ATmega48PA, ATmega88A, ATmega88PA, ATmega168A, ATmega168PA, ATmega328, ATmega328P), Rev. 8271D-AVR-05/11 (ATMEL®, 2011)

    Google Scholar 

  3. Free Software Foundation, GNUmake Version 3.81 (2006), http://www.gnu.org/software/make

  4. Free Software Foundation, The GNU Compiler Collection Version 7.2.0 (2017), http://gcc.gnu.org

  5. IEEE Computer Society, IEEE Std 1149.1 – 1990: IEEE Standard Test Access Port and Boundary-Scan Architecture (1990). Available at http://standards.ieee.org/findstds/standard/1149.1-1990.html

  6. M. Margolis, ARDUINO ® Cookbook, 2nd edn. (O’Reilly, Sebastopol, 2011)

    Google Scholar 

  7. S. Meyers, More Effective C++: 35 New Ways to Improve Your Programs and Designs (Addison-Wesley, Boston, 1996)

    Google Scholar 

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

    Google Scholar 

  9. MinGW, Home of the MinGW and MSYS Projects (2012), http://www.mingw.org

  10. Python Software Foundation, Python Programming Language—Official Website (2012), http://www.python.org

  11. M. Schmidt, ARDUINO ® : A Quick-Start Guide (Pragmatic Programmers, Raleigh, 2011)

    Google Scholar 

  12. SCons, SCons: A Software Construction Tool (2012), http://www.scons.org

  13. W. van Hagen, The Definitive Guide to GCC (Apress, Berkeley, 2006)

    Google Scholar 

  14. Wikipedia, Executable and Linkable Format (2012), http://en.wikipedia.org/wiki/Executable_and_Linkable_Format

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer-Verlag GmbH Germany, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Kormanyos, C. (2018). Working with a Real-Time C++ Program on a Board. In: Real-Time C++. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-56718-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-56718-0_2

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-56717-3

  • Online ISBN: 978-3-662-56718-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics