DEV Community

Cover image for The Basics of the Firmware Development Process
Andrey Solovev for Integra Sources

Posted on

The Basics of the Firmware Development Process

Firmware development is a necessary process in creating a new device and an embedded system. All the features and functionality of a device depend on its firmware. In simple words, firmware lies between software and hardware parts. So, it helps run a software on a device and makes hardware perform required functions without involving users.

Modern electronic products and systems have complex functionality and high workload. One device can perform various functions: it can work as a camera, a cell phone, and transmit, for example, location data. In so doing, such devices require more advanced, more complex firmware with high quality and security.

There are three basic types of firmware, let’s talk about them in detail.

Low-level firmware is stored on read-only chips with ROM, PROM, PLA architectures. This is an implicit part of hardware that cannot be updated or rewritten.

High-level firmware allows for upgrades and is used with flash memory chips.

Subsystem firmware contains a microcode that is integrated in flash chips, LCD units, CPUs.

Firmware is a vital part of any device, and writing firmware is considered to be a difficult and challenging process. However, there are several tips that can optimize firmware development process and can make it organized and smooth.

Here are 5 basic tips for writing a proper firmware from scratch.

The five tips for developing firmware from scratch
The five tips for developing firmware from scratch

1. Define the requirements

The success of the firmware development is dependent on clear requirements. So. at the very beginning of the process, you should identify all the features of your product, its functionality, for example, what data it should process. Besides, you should know for sure what microcontroller, SBC, or SoC, etc., your product is based on.

Moreover, these requirements don’t contain the approaches, methods for building features and writing firmware. Ideally, your requirements should include explicit statements that won’t stir discord among people involved in the development process.

Another important thing is that the requirements should allow for testing the firmware easily and properly. If the requirements are clear and precise, it is easily to define a set of necessary tests for verifying the firmware. Also, there should not be any pairing between the testing and development processes.

*2. Choosing the right tools and technologies *

The selection of tools for writing firmware depends on the hardware platform that your product uses. Various programming languages, integrated environments, tool kits are at your service, and they can make the firmware development process smooth and easier.

If you chose the proper tools, you can enjoy such bonuses as organizing development process, completing the code in auto mode, highlighting the lines of the code, auto-formatting code, etc. So, modern tools and technologies can help you automate and speed up the firmware development.

3. Using an operating system

You can use an operating system for building your firmware, however, you should have strong knowledge about its functionality and abilities. Before starting the development process, it is better to know how everything works in it, for example, tasks, schedules, configurations, communications, and so on. This will help you write a clean and reliable code without any unexpected errors.

4. Collaborating with your team and sharing experience with other developers

Intercommunication with your team is also of extreme importance. Such services as GitLab, GitHab, can help you share the parts of codes you write with other developers and organize the storage of the code. Besides, such sources can provide you with libraries and written codes that can be useful for you.

By the way, sharing experience with other engineers can improve your development process as well, for example, you can have your code reviewed by another developer.

5. Creating and leveraging a reusable code

This will help you save much time and make the development process more efficient. Leveraging a reusable code allows for creating new functionality on top of the components that already exist: libraries, classes, methods, and others.

Writing a reusable code will optimize the work of your team and allow for implementing changes without any errors and difficulties.

a

In a nutshell, a usual firmware development process includes the following parts:

  • high-level and low-level firmware;
  • drivers;
  • writing algorithms;
  • code composition;
  • developing testing software.

The tasks and approaches can vary as the requirements for firmware vary as well. For example, your device can transmit real-time data, and it means that you need to use RTOS or a device can be based on a microcontroller that requires using a limited set of tools for programming it. These and other factors can influence your choice of technologies and approaches.

Top comments (1)

Collapse
 
niyonda_cronytel profile image
Niyonda_Cronytel

Hello. I'm new to everything tech but the technology behind routers really peaked my interest so I want to learn everything I can about routers, mifi and their sofwares. Please advice me which programming language to learn to be able to program router firmware/software/operating system