Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
Which UML diagram should be used for a Software overview which will be written in C for microcontrollers?

I was wondering on how to present a software overview using UML diagram. The code will be written in C for the microcontrollers. So, I can not use the CLASS diagram/ OBJECT diagram/ COMPOSITE STRUCTURE diagram I guess. Then,

  1. Which UML diagram should I use?

  2. Can Activity diagram be used for this? If so, is there any way to combine all the activities in a single diagram to have a view of the overall software?

  3. If UML diagram is not suitable, then which one is the right one for this purpose?

Thanks in advance.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Ideally the program design should be tied up with your requirement specification, so that for each requirement there is a code module, and for that code module there is a test demonstrating how it lives up the requirement. It's kind of an utopia that one rarely manages to uphold in practice, but this kind of design is a good ambition anyway.

Then generally, it is not as important how you document the program design, as long as the overall design gets at all documented - this is surprisingly rare even in professional settings. But all the pedantic details of UML are really optional, use them where you find a case for them, don't use them just for the sake of it. I frequently use UML class diagrams to document code dependencies, as well as state charts which are useful for documenting application behavior. And so on - keep it broad without implementation-details.

The C equivalent of a class is typically a .h/.c pair with the same name, together forming a "module" or "ADT" or whatever you wish to call it.

You need to document all class A uses class B dependencies, as well as all class B is a class A dependencies (inheritance). Inheritance isn't very common in embedded systems, but implementing a HAL is a typical example where it is used. You have an abstract API on top of hardware-specific drivers.

Obviously you need to decide early on if such abstractions are justified - will the program eventually get ported to another MCU or do you count on the silicon vendor's "longlivety" assurance that the MCU will not go End of Life within the expected product life time? Looking at the completely broken silicon market as of today, I would assume that any microcontroller project needs to get ported plenty of times during its life time.

over 4 years ago · Santiago Trujillo Report

0

To model an overview of the static structure of a large application written in C, I would recommend a package diagram. The packages in the diagram would represent the subsystems, most likely corresponding to the high-level directory structure of the application. Dependency arrows between these packages would indicate which subsystem makes use of which other subsystem(s).

For each top-level package, you could create a separate package diagram, showing the subsystems/subdirectories and their dependencies.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!