Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently working on a project where I'm writing the firmware for an electronic system in C, and have been asked to produce documentation on the development/evolution of the software for the embedded devices. Having developed software in the object oriented paradigm I know to use UML to document the software such as class diagrams with objects, however this does not work for documenting the development of my embedded system. So what should I produce to document the development of my firmware?

share|improve this question
up vote 3 down vote accepted

Even for a system that is not designed according to the OO paradigm, you can still use UML notation to document the system, possibly extended with some Data Flow Diagrams (as I can't immediately find a corresponding diagram in UML). Diagrams worth looking into, even for non-OO systems are:

  • State (Transition) Diagrams
  • Use Case Diagrams
  • Sequence Diagrams

When modeling a non-OO system, you may have to be a bit flexible as to what you model as a 'class'.

For example, if you have a header file stack.h like this

struct stack;
struct stack* stack_create(void);
void stack_destroy(struct stack*);
void stack_push(struct stack*, void*);
void stack_pop(struct stack*);
void* stack_top(struct stack*);

with corresponding implementation, there is nothing to stop you from presenting that as a 'class' stack in your models.

share|improve this answer

You can make an object-oriented design and implement it in C, even though C does not directly support object-oriented concepts.

See for example Rumbaugh et al., "Object-Oriented Modeling and Design", Chapter 16, Prentice-Hall 1991, ISBN 0-13-629841-9.

share|improve this answer

You do the same design only with conceptual modules (like you really should've done in OO design) rather than explicit classes. In C, those modules tend to be functions, structures, or some bundle of functions, structures or both.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.