Software Diagramming In Embedded Systems?
afd100 writes "I work for a medium-sized company building embedded systems using C. As of yet, we do not have a great design methodology, but it is something we're working on. For the last 7 years now, we've been documenting our embedded software in an IEEE'esque Software Detailed Design, and using a very cryptic block diagram to explain our software. What does the embedded software community at large currently use to graphical represent their software or do they even try this? Since the programming is functionally decomposed, is UML the right way to go?"
About the only case where diagrams are helpful are FSM diagrams.
UML includes state machines, real-time UML is all about state machines.XML is a known as a key material required to create SMD: Software of Mass Destruction
Take it a step up and evaluate some modeling languages and tools, such as AADL and OSATE.
http://www.aadl.info/
This stuff is MADE for real-time, embedded systems. The ultimate goal is to use it through design and analysis, and then go ahead and generate code. It does take some getting used to, and there is a lot to it so keep that in mind.
It's not perfect, and still under development, but very cool. So give it a try, see if you can pick it up. I'm generally a supporter of UML, but after being introduced to AADL and OSATE in an architecture course I was eventually convinced that it could be better than UML for this field.
Most times when people think about using flowcharts, they really should create state transition diagrams http://en.wikipedia.org/wiki/State_diagram/ to discuss, describe, and document behavior. Statecharts are an improvement on earlier state transition diagrams and are included in the latest UML specification.
Some Statechart references:
I did this many times. UML class, use-case and sequence diagrams were NEVER helpful - it's just much easier to explore code with a good IDE.
The argument that a new architect will have to spend days familiarizing with the code is moot. Architects are arguably THE main people in a project - their mistakes can cost A LOT. So I'd rather let him/her spend some time and get acquainted with the code and code 'style' then let him/her rush into drawing more diagrams.
Also, diagrams have a very nasty habit to fall out of sync from the real code.
FSM diagrams are very useful, though. Especially if they are automatically generated.
by Bruce Powel Douglass explains how to use UML to model real-time embedded systems. I picked it up when i needed to come up with graphical designs for my senior thesis a couple of years ago. I had never once worked on a real-time system but this book helped me a lot in that it stresses the importance of the state and sequence diagrams (as many previous posters are also). Douglass does a good job of showing how to use the state diagram and nested states for multi-threading which helped me on my specific project. With this book i was able to catch a lot mistakes in my initial "swag" design and better able to understand how all the multi-threading parts would need to fit together. And why wouldn't UML work for decomposed functions? Use case, sequence, and state diagrams are not limited to any level of abstraction/detail, right?
And uses all the wrong ideas. EEs had a drawing standard for state machines for decades, UML ignored all of it. Yet another reason to ignore UML.
I still have more fans than freaks. WTF is wrong with you people?
Since I am currently in the middle of drawing one (and yes, I'm kinda spacing out, reading /.), I would also argue that ER diagrams are useful. Just the drawing of them makes you think through some things that might never have occurred to you if you just started creating tables in a database.
And/or 3) something everyone except the boss knows is out-of-date and dangerous to refer to for anything important.
It's strange that the question explicitly asked for diagrams. What if this particular system is better described in plain text -- should there still be diagrams instead?
Apart from that I only have three pieces of advice: