[SOLVED]Embedded Software Design Process

Thread Starter

Pushkar1

Joined Apr 5, 2021
416
I would ask some advice for beginners who want to develop embedded software system in professional way.

What process should be followed in software design?

This is my observation

1. What system supposed to do
2. List of requirements
3. Planning with paper and pen For example - Flow chart, State diagram, Table
4. Write program
5. Debug code
6. Finally test program on hardware

I would appreciate for best advice
 

KeithWalker

Joined Jul 10, 2017
3,063
When you are designing functional software, start with a detailed specification of what the software is supposed to do (not how it will do it). Then start designing a block diagram of the software from the top down. In other words, start with a few broad functional blocks, e.g. operator interface, data input, data processing, output functions, etc. Then break each block down one level at a time by splitting it into more detailed functions. Include flow and timing diagrams as needed. Continue to add more detailed levels until you can not simplify each one any more. At each level, define the inputs and outputs of each function. If you have existing libraries of some of the functions, e.g. standard interfaces, etc, include them in the diagram at the appropriate levels.
When you start writing the code, do it from the bottom up. Take each bottom level block and write a function that will do what is required. make each function independent of all of the others, defining the inputs and outputs. Test each bottom level function independently using real inputs or dummy data. When you have all the bottom levels written and tested, start on the next level up, incorporating the lower levels and make sure that they work together and do not interfere with each other. When you get to the top levels you will have tested, well documented code.
:)
 
Last edited:

MrChips

Joined Oct 2, 2009
30,708
There are two approaches one can use in system design and implementation:

Top-down design
Bottom-up approach

One can use both methods concurrently in coding the system. With top-down design you can have a working template from day-1.

For example:
C:
void main(void)
{
   init();
   while (1)
   {
      getEvent();
      doEvent();
   }
}
With top-down, you create a shell that consists of the control flow with dummy functions while leaving out the details. With bottom-up, you then go in and implement each function in detail.
 

KeithWalker

Joined Jul 10, 2017
3,063
Top down software design with bottom up implementation has the added benefit that the coding can be written and tested by a team, rather than an individual because each function is well defined and independent of the others. Module testing should be thorough including inputs that exceed the expected values, character types and data types to make sure that errors are handled correctly and do not hang up the operation of the function.
 
Last edited:

nerdegutta

Joined Dec 15, 2009
2,684
Don't forget that your software can't do it's magic, if the hardware and circuit is not well designed.

A wise man said: "First comes the hardware, then comes the software."
 
Top