Embedded Software Development Process and Tools: From Requirements to Firmware Release
Table of Contents
An engineer builds a room-use logger for a college lab. Every time the door opens or closes, the device saves the event. The first demonstration goes well. Then someone asks three questions. Will it keep recording while yesterday’s data is being downloaded? What happens if the power fails during a write? How do we know which firmware version produced the file?
Those questions explain why embedded software development takes more than writing code and flashing a board.
The embedded software development process has eight practical stages: define measurable requirements, design the firmware architecture, establish the build environment, implement the software, integrate it with hardware, verify it under realistic conditions, release an identifiable image and maintain it in the field. The main tools include a cross-compiler and linker, a debugger and probe, a device programmer, a serial terminal, test software and instruments that let you observe the hardware. Choose each tool according to the question you need it to answer. essc-india.org
This guide follows the room-use logger from its first requirement to its first field report. The numbers are illustrative design targets. You can repeat the calculations and adapt the tests to a different device.
The embedded software development process at a glance
|
Stage |
Decision to make |
Useful tool or evidence |
What you should have at the end |
|
1. Requirements |
What must the device do, under which conditions? |
Requirements table and acceptance examples |
A behaviour you can test |
|
2. Architecture |
Where will events, timing and storage be handled? |
State diagram, interface notes and resource budget |
A design that fits the device |
|
3. Build environment |
Can another engineer build for the same target? |
Cross-toolchain, build configuration and version control |
An identifiable firmware image |
|
4. Implementation |
Can each part behave correctly on its own? |
Editor or IDE, compiler warnings and unit tests |
Tested modules with defined interfaces |
|
5. Board integration |
Does the software operate the physical hardware correctly? |
Debug probe, serial terminal and logic analyser |
Evidence from the target board |
|
6. Verification |
Does the complete device meet each requirement? |
Host tests, board tests and controlled inputs |
Results linked to the tested build |
|
7. Release |
Which image is approved for which board? |
Programmer, release manifest and installation check |
A tested package another person can install |
|
8. Maintenance |
Can the team reproduce a field issue and verify a fix? |
Build ID, diagnostic records and regression tests |
A verified change for the affected devices |
Teams often revisit earlier decisions. If a board test shows that exporting records delays incoming events, the useful next step may be to revise the storage interface or scheduling design. Running the same failing test more times will not remove that bottleneck.
Step 1. Turn the product request into measurable software requirements
“Record when the lab door opens” sounds clear until two engineers implement it differently. One saves an event whenever the input changes. Another waits until the input has held steady long enough to count as a genuine change. A third question appears after installation: should an open door at startup create an event, or simply establish the initial state?
Resolve those questions while the expected behaviour is still inexpensive to change. For each requirement, write the input condition, the expected output and the evidence that would convince someone it works.
|
Example requirement |
Acceptance check |
|
Record one event for each accepted transition between open and closed. |
Apply a known sequence containing stable changes and short contact bounce. Compare the saved event list with the expected list. |
|
Preserve 30 days of history at up to 120 events per day. |
Write 3,600 valid records and verify that the oldest required record remains available. |
|
Continue recording during an export. |
Trigger ten known transitions while downloading an earlier snapshot. Check that all ten appear in the next export. |
|
Recover predictably after interrupted storage writes. |
On a lab unit, interrupt a write under controlled conditions. Restart and verify that completed records remain readable and any incomplete record is handled as specified. |
|
Identify the running firmware. |
Restart the device and retrieve its build ID without attaching a development debugger. |
One decision deserves its own sentence: what happens when storage fills? For this logger, the owner might choose to overwrite the oldest complete record and increment an overwrite counter. An application that must preserve every event would need a different policy. That choice changes both the software and its tests.
Stage output: A short requirements table a developer and a tester interpret the same way.
Step 2. Design the architecture and calculate the resource budget
Start with the path one piece of data takes. A door transition reaches an input pin. Firmware decides whether the change is valid, assigns a timestamp, constructs a record and stores it. Later, an export function reads completed records and transfers them to a computer.
Give each part one responsibility. The input code reports observations. The event logic decides what counts as a change. The storage module owns record format and write completion. The export module reads through a defined interface. With that separation, changing the memory chip should require little or no change to the rule for recognising a door event.
Worked example: how much storage does the logger need?
Assume the encoded record is 16 bytes and the requirement is 120 events per day for 30 days.
|
Item |
Calculation |
Result |
|
Records to retain |
120 × 30 |
3,600 records |
|
Event data |
3,600 × 16 bytes |
57,600 bytes |
|
Space in a 64 KiB storage region |
64 × 1,024 bytes |
65,536 bytes |
|
Space remaining before overhead |
65,536 − 57,600 |
7,936 bytes |
The calculation tells you that the records fit before headers, indexing, alignment, erase-block layout and recovery information. Check those costs against the actual memory device. Also specify the stored record layout explicitly. Using the in-memory size of a C structure as the permanent file format can cause compatibility problems after a compiler or structure change.
A second calculation exposes a design problem
Suppose the logger exports the 57,600-byte history over UART at 115,200 baud using 8N1. Each byte takes ten transmitted bits: one start bit, eight data bits and one stop bit. Under ideal continuous transfer, the link carries 11,520 bytes per second. A binary export therefore takes at least five seconds. Text formatting, headers and pauses increase that time.
Now the requirement “continue recording during export” has a concrete consequence. A design that suspends event capture until the entire transfer finishes can lose several seconds of activity. A buffered or incremental export gives the input path opportunities to keep running. Verify that behaviour on the board.
Stage output: A data-flow design, resource calculations and an explicit policy for handling slow operations.
Step 3. Build a development environment another engineer can reproduce
Embedded development usually involves two computers in different roles. The host is the machine where you edit, build and run many of the tests. The target is the board that executes the deployed firmware. A cross-compiler runs on the host and produces machine code for the target processor. The linker combines compiled objects and places code and data according to the target memory layout. essc-india.org
For an STM32-based lab project, one practical starting setup is STM32CubeIDE, a supported board and probe, and a serial terminal. ST’s tooling supports building and debugging STM32 applications. Its documentation also identifies the GDB server that connects the host debugger with the ST-LINK probe. STM32CubeIDE 2.3.0 documentation
Record the board revision, target processor, toolchain version, SDK version, build configuration and source revision. Then perform a simple handover test: ask another engineer to build from a clean checkout and identify the firmware running on the board. If the build needs an undocumented file from the original developer’s laptop, the setup is incomplete.
Which build files are useful after compilation?
|
Output |
Why keep it? |
|
ELF file with matching symbols |
Helps a debugger map addresses to the functions and source associated with that build. |
|
Flashable image, such as BIN or Intel HEX |
Supplies the image used by the programmer or update process. The required format depends on the target. |
|
Linker map |
Shows how code and data were placed and which sections consume memory. |
|
Build configuration and version record |
Identifies the options, toolchain and source used to create the release. |
Keep the symbol file from the actual release build. A locally rebuilt debug version can place functions at different addresses and lead the investigation to the wrong line of code.
Step 4. Implement a working path through the device
Begin with one complete behaviour: accept a known input, construct one event, store it and read it back. That small path tests assumptions about the input, record layout and storage interface before the team adds a display, configuration menu or communications stack.
For the logger, divide implementation into three independently testable pieces:
- Event recognition. Feed timestamped input changes into a function. Verify how it handles a stable opening, contact bounce, a stable closing and startup with the door already open.
- Record encoding. Turn an event into the documented byte format. Test the smallest and largest supported field values and confirm that older stored records remain readable after a format change.
- Storage policy. Define what a successful write means, how a full store behaves and what the reader sees if a write is incomplete.
Use a fake storage implementation on the host to exercise application decisions quickly. Then run target tests against the real storage device. The fake can tell you how the application responds when a write returns an error. The physical device can tell you how long the write takes and what happens during a restart.
When should you introduce an RTOS? Consider it when the design has several activities with different timing and waiting behaviour, such as recording events, writing storage and serving exports. A small event loop may already meet the requirements. Measure the longest delay before adding scheduling complexity. If you use an RTOS queue, decide what the producer does when that queue fills. FreeRTOS documents queues as a mechanism for moving data between tasks. 1.freertos.org
Step 5. Bring up the board and debug the first incorrect observation
Board bring-up is the first controlled check that the image, processor, pins and peripherals work together. Start with an observable baseline: a known image, a startup identifier and one input or output you can verify. Integrating five peripherals before establishing that baseline gives you five places to look when the board stays silent.
For the logger, verify the chain in order:
- Does the board boot the expected firmware version?
- Does the physical input change when the contact changes?
- Does firmware observe the corresponding input transition?
- Does the event logic accept it exactly once?
- Does storage contain the record after a restart?
- Does export reproduce the same value and order?
Stop at the first point where expected and observed behaviour differ. If the pin changes and firmware records the transition correctly, rewiring the input is unlikely to explain why the exported timestamp is wrong.
Which debugging tool should you pick?
|
What you observe |
First tool to use |
What it can tell you |
|
The board appears to run an old feature after flashing. |
Startup build ID and programmer output |
Whether the intended image is running on the intended board. |
|
The program reaches an unexpected branch. |
GDB with a compatible probe |
Which values and execution path led to the decision. |
|
A peripheral returns unexpected bytes. |
Logic analyser |
What was transferred on the digital bus, including ordering and timing. |
|
A digital trace decodes inconsistently. |
Oscilloscope |
Whether the waveform has an electrical or timing issue hidden by the digital decode. |
|
Counting fails only during verbose logging. |
Timestamped trace or an observed timing pin |
Whether logging changes the interval between servicing events. |
|
Flash usage increases after a small change. |
Linker map comparison |
Which code or data sections grew between builds. |
A breakpoint changes the timing of the system. It is valuable for inspecting a variable, but an uninterrupted trace is usually more informative when the failure itself depends on timing. Similarly, adding serial prints to investigate a slow operation can make that operation slower. Record how you observed a fault as well as what you saw.
Step 6. Test on the host, on the target and under realistic load
Use the cheapest test that can answer the question accurately. A laptop can test whether ten input transitions should produce four accepted events. It cannot establish the write time of the selected memory chip on your assembled board. Choosing the test environment is part of the engineering decision. The ESSCI handbook likewise distinguishes verification on a host or emulator from verification on the target. essc-india.org
|
Test level |
Logger example |
Passing evidence |
|
Host unit test |
Feed a recorded sequence of bouncing input states into the event logic. |
Accepted events exactly match the expected list. |
|
Module integration test |
Combine the encoder with the storage interface and read records back. |
Stored and decoded fields agree, including boundary cases. |
|
On-target test |
Write records to real storage, restart and read them back. |
Completed records survive and remain in the documented order. |
|
Hardware-in-the-loop test |
An external fixture generates a repeatable input sequence while the physical board exports data. |
Captured event count and timing match the inputs within the agreed tolerance. |
|
Long-running test |
Repeat capture and export until the store wraps. |
The overwrite policy holds and the device continues accepting events. |
|
Release regression test |
Run the critical behaviours using the image intended for deployment. |
The report identifies the exact image, board and test outcomes. |
A test that catches a plausible false pass
Suppose the test generates 100 transitions during an export and the logger reports 100 events. The count passes. But what if the device missed event 47 and duplicated event 48?
Use an input pattern with identifiable intervals and compare the sequence, order and timing as well as the total. A correct count is reassuring. Matching the individual events answers the actual requirement.
Where continuous integration fits
A useful first CI pipeline builds the target image from a clean checkout, runs host tests and stores the result with the source revision. Add target-board tests when you have a controlled fixture. For every automated board run, capture the board identity, flashed build, stimulus and output.
Report an unavailable test board separately from a passing test. Otherwise a team may approve a release believing its physical checks ran when only host tests completed.
Step 7. Package and release firmware that can be identified and recovered
A successful flash proves that a programmer transferred an image. A release needs more information: which hardware supports that image, which tests passed, how the installation is verified and what happens if the update cannot complete.
For a small project, a short release manifest is enough to make those decisions visible.
|
Release field |
Illustrative entry |
|
Firmware version |
1.2.0 |
|
Supported hardware |
Room logger board revision B |
|
Change |
Recording continues during a history export |
|
Stored-data compatibility |
Reads records created by version 1.1 |
|
Verification |
Export-under-load, restart and storage-wrap tests passed on revision B |
|
Known limitation |
Export duration increases when the receiver pauses |
|
Recovery procedure |
Use the documented recovery method for revision B and verify the resulting build ID |
Check stored data as well as code. A previous firmware image may boot successfully yet fail to read records written by the newer version. If you promise rollback, test what happens to existing data after rollback.
For products with field updates, choose an update method supported by the device’s flash layout and bootloader. MCUboot documents configurations that support trial images, confirmation and reversion. Whether a particular device can use that behaviour depends on how the bootloader and storage are configured. Exercise the actual product’s supported recovery path before deployment. Secure boot for 32-bit Microcontrollers!
Step 8. Maintain the device using evidence from the field
A week after installation, the lab manager reports, “Some door events disappeared on Monday.” A useful device gives the engineer enough information to narrow the cause. Which firmware was running? Did the device restart? Was the store full? Had an export just started? Did the clock change?
For this logger, useful diagnostics include the firmware version, hardware revision, reset reason where available, storage overwrite count and export status. Each value supports a particular decision. A high overwrite count points towards retention or capacity. Records still present on the board but absent from the exported file point towards the export path. Timestamps that jump while sequence numbers remain continuous point towards timekeeping.
Turn the field report into a regression test:
- Recreate the affected board and firmware configuration.
- Establish the smallest sequence of actions that reproduces the symptom.
- Save the failing observation.
- Apply the change and repeat the same test.
- Run related tests to check the effect on storage, timing and compatibility.
- Record which deployed versions need the correction.
The final release note can now say exactly what changed: “Version 1.2 continues capturing events during a history export. Verified using 100 identifiable input transitions on revision B.” That statement is more useful to the next engineer than “improved performance and fixed minor bugs”.
Which embedded software development tools do you actually need?
Start with the target and the job you need to do. A first microcontroller project can be productive with a supported board, compatible build tools, a debug probe, a serial terminal and Git. Add instruments or automation when you have a specific question the existing setup cannot answer. ST’s current documentation describes its STM32 development environment and probe integration. STM32CubeIDE 2.3.0 documentation
|
Tool category |
Examples |
Choose it for |
|
IDE |
STM32CubeIDE, IAR Embedded Workbench, Keil µVision, MPLAB X |
Editing, project configuration and an integrated debug workflow for supported targets |
|
Compiler and linker |
Arm GNU Toolchain or a supported vendor toolchain |
Producing target machine code and placing it in the correct memory regions |
|
Build automation |
Make, CMake with a suitable backend, vendor-supported command-line builds |
Repeating the build outside one developer’s IDE |
|
Version control |
Git |
Tracking source changes, board configuration and release history |
|
Debugger and probe |
GDB with ST-LINK or a compatible J-Link setup |
Inspecting execution and memory on a physical target |
|
Programmer |
STM32CubeProgrammer or the target vendor’s programming utility |
Installing and checking a supported image |
|
Signal measurement |
Logic analyser and oscilloscope |
Observing digital transactions, timing and electrical behaviour |
|
Automated testing |
Host test framework, CI runner and a board fixture where available |
Repeating known checks after changes |
|
RTOS, when needed |
FreeRTOS or another supported kernel |
Scheduling activities with defined priorities and communication needs |
An IDE, a compiler and a programmer perform different jobs even when one button invokes all three. That distinction helps with troubleshooting. A compile error points towards source or configuration. A link error may point towards missing code or memory layout. A programming failure occurs later, when the tool attempts to write the target. updates.iar.com
How tool selection changes for embedded Linux
For an MCU logger, you may own one firmware image and the startup code beneath it. For a Linux gateway that collects logs from several rooms, you may need to track a bootloader, kernel, board configuration, root filesystem and application. Decide which of those components your team actually owns before choosing a build strategy.
|
Decision |
Microcontroller logger |
Embedded Linux gateway |
|
What do you build? |
Firmware for the selected MCU and board revision |
An application package, a board image or both |
|
What do you inspect at startup? |
Reset behaviour, firmware ID and peripheral initialisation |
Boot log, kernel/device detection and service startup |
|
What establishes compatibility? |
MCU, pin configuration, flash layout and stored-record format |
Board revision, image configuration, available device interfaces and application dependencies |
|
What should a release test include? |
Flash, boot, record, restart and recover |
Install or boot the image, start the service, access the peripheral and recover after restart |
For a learner comparing courses, ask to see one complete build–flash–debug cycle on the actual target. A demonstration where the trainer identifies the firmware version, captures a hardware observation and verifies a fix shows how these tools work together. Explore practical embedded systems training in Hyderabad at Embedded Hash. embeddedhash.in
Common embedded development mistakes and how to recognise them
|
Mistake |
What it looks like in practice |
Better engineering check |
|
Writing a vague requirement |
“The export should be fast.” |
Specify the data volume, link settings and acceptable time. |
|
Treating a successful demo as a completed feature |
One event is recorded correctly on an empty device. |
Repeat on a nearly full device and during another operation. |
|
Using the same observation for every fault |
More serial output is added to a timing-sensitive path. |
Use a timing trace or external capture and compare the behaviour. |
|
Combining unrelated changes |
The board configuration, storage driver and export format all change together. |
Integrate one observable path at a time and retain a known working baseline. |
|
Testing a different image from the one shipped |
Debug firmware passes and the release image is built afterwards. |
Run critical checks on the packaged release candidate. |
|
Assuming rollback preserves user data |
The old firmware boots but cannot read new-format records. |
Exercise both image recovery and data compatibility. |
|
Losing the link between field evidence and source |
A report contains a line number but no build ID. |
Keep release symbols, configuration and source revision together. |
Frequently Asked Questions
Embedded software development is the process of creating software that is specifically designed to run on embedded systems, such as microcontrollers and other devices.
Follow structured coding standards, use version control, thoroughly test on real hardware, document your code, and prioritize efficient memory management to ensure reliable and maintainable embedded software
A version control system is a tool that tracks changes to code over time. It allows developers to collaborate on code and keep track of different versions of the code.
Clear documentation is important in embedded software development because it helps other developers understand the code and how it works. It also helps with maintenance and troubleshooting.
Automated testing is the process of using software tools to test code automatically. This can help catch bugs and errors early in the development process.
Coding standards are guidelines for writing code that make it more readable, maintainable, and consistent. They can include things like naming conventions and formatting rules.
Commonly used programming languages in embedded software development include C, C++, and assembly language. However, the choice of programming language depends on factors such as system requirements, hardware constraints, and development environment.
Commonly used tools for embedded software development include integrated development environments (IDEs) like Eclipse and Visual Studio, compilers, debuggers, version control systems, modeling tools, and simulation/emulation tools specific to the target hardware.
Common testing methodologies in embedded software development include unit testing, integration testing, system testing, and validation testing. Techniques such as white-box testing, black-box testing, and hardware-in-the-loop (HIL) testing are often employed
Handling software updates and maintenance in embedded systems with long lifecycles involves implementing a robust update mechanism, ensuring backward compatibility, providing secure firmware updates, managing version control, and having a well-defined maintenance plan to address bug fixes, enhancements, and security patches.
