Bjarke Freund-Hansen
Bjarke Freund-Hansen

Reputation: 30128

Design / Implementation Patterns for Embedded Systems

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

Topic could be:

I guess what I am asking for is something along the lines of GoF, but focused specifically on embedded software development.

Thanks

Upvotes: 5

Views: 1476

Answers (3)

איתן מס
איתן מס

Reputation: 41

I think that the embedded world is missing good books and resources. Here is my advice. I hope you would find the information interesting.

test-driven development for embedded C is a beautiful book that can give you a good start in the vital field of test-driven design. At the moment, it is the best knowledge base of TDD in embedded that I found so far.

the art of designing embedded system is a comprehensive book that encapsulate lots of different edvices. Most of the devices are great, the book was written a decade ago, so many ideas and frameworks considered old, but the views are provocative and exciting. I learned a lot of little tricks that changed the way that I see the embedded world. The writer is keen on best practices and tradeoffs, what I learned from that book is how important in to use pure functions and can it help me avoid stupid undetectable bugs.

The following advice is not coming from embedded in particular, but it helps me a lot in having much better code, clean code, and clean architecture books. They have been written for higher layers languages, BUT the principles are the same, good code is a good code, those books gave me a different perspective of what considered good and what is code craftsmanship, I wait for the programmer that would write such a book for the world of embedded systems.

and last advice is browsing the barrgroup website which have great webinars and excellent code standard. They also have a platform for embedded courses, in my opinion, they emphasize the essential aspects of development in an agile environment with TDD.

I hope the references can help you, waiting to see other answers as well.

Upvotes: 1

Andy Lin
Andy Lin

Reputation: 447

I've read Design Patterns for Embedded System in C for only the first two and half of third chapters.

I'm not gonna make a conclusion about this book, instead I'm offering you a message that the part of example code from this book is not runnable.

Here is snippet code from the 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 still some cases where like missing colon, typo, etc.

Upvotes: 0

Dan
Dan

Reputation: 10393

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

A description of the book states:

The author carefully takes into account the special concerns found in designing and developing embedded applications specifically concurrency, communication, speed, and memory usage.

Looks like topics also include hardware access, state machines, debouncing, and resource management.

Upvotes: 2

Related Questions