Tips for Creating a Well-Abstracted Architecture

 Throughout this book, simple examples of minimal complexity have been provided. Our focus has been to keep the code clear and readable to illustrate the particular real-time operating system (RTOS) concepts being addressed and keep the interactions with hardware as easily understood as possible. However, in the real world, the best code bases for long-term development are those that allow developers to move quickly with great flexibility and determination to meet targets. This chapter provides suggestions on how to go about architecting, creating, growing, and maintaining a code base that will be flexible enough for long-term use. We'll be exploring these concepts with real code by cleaning up some of the code developed in earlier chapters through the addition of flexibility and better portability to different hardware.

This chapter is valuable to anyone interested in reusing code across multiple projects. While the concepts presented here are by no means original, they are focused solely on firmware in embedded systems. The concepts covered are applicable to bare-metal systems, as well as highly reusable RTOS task-based systems. By following the guidelines here, you'll be able to create a flexible code base that adapts to many different projects, regardless of what hardware it happens to be running on. Another side effect (or direct intention) of architecting a code base in this manner is extremely testable code.

In this chapter, we'll cover the following topics:

  • Understanding abstraction
  • Writing reusable code
  • Organizing source code
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.119.199