CI/CD Implementation in Embedded Development: Suppress the Fundamentals to Maximize Development Efficiency
- By IAR
- 5 min read

In the development of embedded systems, the introduction of continuous integration (CI) and continuous delivery (CD) is key to dramatically improving development efficiency and quality. Embedded development has different challenges from general software development, such as hardware-dependent testing and real-time requirements, but the introduction of CI/CD overcomes these challenges and brings significant benefits.
Advantages of CI/CD Construction
By introducing CI/CD to embedded development, the following benefits can be expected.
Quality improvement and early detection of bugs
By running automated tests when code changes, defects can be detected at an early stage, leading to reduced debugging costs and the prevention of rework. Early detection of bugs through unit tests (C-Unit, Unity, etc.) and coupled tests.
Automated builds increase development speed.
In embedded development, where different hardware and compiler versions are used, manual builds are prone to errors; CI/CD automates the build process, including building the build environment, preventing builds in the wrong environment and increasing development speed.
Hardware-aware automated deployment
Updating firmware is a time-consuming task, but CI/CD makes it possible to trigger a push to the repository to automatically build the firmware and, if successful, automatically flash (write) the program to the microcontroller in the test environment. This allows testers to build an environment where they can always test with the latest firmware.
Version Management for Long-Term Operation
Since embedded systems are often operated for long periods of time, version control is very important. CI/CD facilitates troubleshooting.
Security Improvements
Security measures such as vulnerability checks can also be automated with CI/CD. since embedded devices are often used in critical systems such as IoT devices and in-vehicle devices, it is important to utilize static analysis tools to automatically perform security checks.
Automated Build and Test Flow with CI Deployment
A typical CI/CD workflow is as follows
Developers develop code in IAR Embedded Workbench and push it to a version control tool such as Git. This allows CI tools such as Jenkins to run a job (pipeline). This job includes the build, static analysis (C-STAT), unit testing (simulator or actual device), and writing the firmware to the target board and executing the program. Once testing is complete, the source code and firmware are automatically stored in their respective repositories or artifact storage locations.
Files to be versioned in an IAR project
When versioning an IAR project, it is recommended that the following files be properly managed
Files that should always be versioned
- All source files
- Project file (.ewp): a kind of make file that contains all the build instructions.
Files that should be versioned when used in a project
- Customized linker configuration file (.icf )
- Customized board description file (flashloader configuration file) (.board )
- Custom C-SPY macro file (.mac )
- Custom argument variablesfile (.custom_argvars )
- Files used in custom builds and build actions (e. g..batfiles, etc. )
Files that should be versioned according to the way you work
- .ewt files if you are using C-STAT or C-RUN
- Debugger configuration file (.ewd )
- Workspace files (.eww )
Files that do not require version control
Files in the settings folder: No version control is needed since they are frequently updated.
- Output files (binary files, object files, etc.) in folders with build configuration names: can be regenerated when needed.
CI/CD realized with IAR Build Tools
IAR Systems offers IAR Build Tools as a product for continuous integration. It is a tool dedicated to command line (CLI) execution and is released simultaneously in the same version as IAR Embedded Workbench.
With IAR Build Tools you can
- Build: Build using IAR's own compilers (iarbuild, iccarm, iasmarm, ilinkarm, etc.); based on a project file (.ewp) created with IAR Embedded Workbench, you can rebuild everything, make changes only, clean, etc, clean, etc. are available.
- C-STAT static analysis: if you have added the license option, you can check your code for potential problems based on coding rules such as CERT or MISRA-C. You can run C-STAT analysis and generate HTML reports.
- Program and Run (cspybat): includes a utility to run the C-SPY debugger on the command line, allowing you to write firmware images and run programs according to the debugger settings in the project options.
Multi-platform support
IAR Build Tools supports multiple platforms such as Ubuntu, Red Hat (v9.20 or later), Windows (v9.20 or later), and you can choose to use any platform with one license.
VS Code Extensions
IARprovides theIAR Build extension and the IAR C-SPY Debug extension forVisual Studio Code tobuild, C-STAT static analysis and debug (simulator and real machine) IAR Embedded Workbench projects fromVS Code. IAR C-SPY Debug extension is available.
Maximize Efficiency and Productivity
CI/CD in embedded development offers a wide range of benefits, including improved quality, accelerated development speed, deployment efficiency, robust version control, and enhanced security. IAR Systems offers a variety of solutions, including IAR Embedded Workbench and IAR Build Tools, to help you build a CI/CD environment. These tools maximize the efficiency and productivity of your embedded development efforts and enable you to develop higher quality products.
For those who want to learn more about the contents of this article, we recommend watching the on-demand videos. Demonstrations can be viewed in the video.