Design / Implementation Patterns for Embedded Systems

Are there any good sources for design and / or implementation patterns for embedded systems? Books or good web resources.

The subject may be:

  • Reflections on a typical way to separate register addresses from driver implementation.
  • Or the practice of using / creating a level of abstraction of equipment and how to achieve the greatest effect from this.
  • Building a single code base for multiple hardware versions / platforms.
  • Prioritize the ISR and divide them into a time-critical part and a, which should be performed when time resolves the part.
  • Unit testing, or even test-based development for embedded systems?

I assume that what I am asking is something like GoF, but is specifically designed for developing embedded software.

thanks

+5
source share
3 answers

I haven't read it yet, but Bruce Powell Douglass has a new book called Design Patterns for Embedded Systems in C.

The description of the book reads:

The author carefully takes into account the special problems that arise during the design and development of embedded applications, in particular concurrency, data exchange, speed and memory usage.

The themes also seem to include access to hardware, state machines, troubleshooting, and resource management.

+2
source

I only read the Design Patterns for embedded systems in C for the first two and a half third chapters .

I am not going to conclude about this book; instead, I offer you a message that part of the sample code from this book does not work.

Here is a snippet of code from a book.

typedef struct MotorProxy MotorProxy; struct MotorProxy { unsigned int* motorAddr; unsigned int rotaryArmLength; }; void MotorProxy_disable(MotorProxy* const me) { if(!me->motorData) //wrong! should be me->motorAddr { return; } me->motorAddr &= 0xFFFE; } 

There are some other cases where the colon is missed, a typo, etc.

0
source

I think the built-in world lacks good books and resources. Here is my advice. I hope you find the information interesting.

test-driven development for embedded C is a great book that can give you a good start in the vital area of ​​test design. This is by far the best TDD embedded knowledge base I have found so far.

The Art of Embedded Design is a comprehensive book that contains many different applications. Most devices are great, the book was written ten years ago, so many ideas and frameworks are considered old, but the views are provocative and exciting. I learned a lot of little tricks that changed the way I see the built-in world. The author is passionate about best practices and trade-offs from what I learned from this book, how important it is to use clean functions and whether this can help me avoid stupid undetectable errors.

The following advice, in particular, does not apply to embedded functions, but it helps me a lot to have much better code, clean code, and books on clean architecture . They were written for languages ​​of a higher level, BUT the principles are the same, good code is good code, these books gave me a different perspective on what is considered good and what code mastery is, I'm waiting for a programmer to write such a book for the world embedded systems.

And the last tip is to browse the barrgroup website , which has great webinars and a great code standard. They also have a platform for embedded courses, in my opinion, they emphasize the main aspects of development in a flexible environment with TDD.

I hope the links can help you, expecting to see other answers.

0
source

All Articles