Skip to content

Streamlining Multi-platform Development and Testing

In today’s pervasively digital landscape, building software for a single platform is a 1990s approach. Modern applications, even those designed for specific embedded targets, must be adaptable enough to run seamlessly across various platforms without sacrificing efficiency or reliability.

This is often easier said than done. Here are some key points to consider when developing and testing multi-platform embedded software.

Emulation and virtual machines

When developing software, especially in the initial stages, testing and debugging often don’t happen on the final hardware but on development machines. That, and a frequent lack of target hardware means it’s a good idea to produce a build that can run within a virtual machine or container. Dedicating time and effort in developing custom hardware emulation layers and specialized build images pay off by enabling anyone in the test or development team to run a virtualized version of the final product.

Multi-board variants

Many product lines offer multiple hardware variants, with differing screen sizes and capabilities. Depending on the severity of the differences, these variants might require dedicated builds, potentially extending the time and resources devoted to your project. To avoid proliferating build configurations, consider enabling the software to auto-adapt to its hardware environment, provided it can be done reliably and without too much effort.

Mobile companion apps

Does your embedded product need to interface with a companion mobile app? These apps often handle remote configuration, reporting, and user profiles, enhancing product functionality and user experience. If so, consider using a cross-platform tool kit or framework to build your software. These allow you to share your business logic and UI components between iOS, Android, and your embedded platform. You can choose to reuse UI components in a stripped-down version of your application written specifically for mobile, or write the application once and have it adjust its behavior depending on the screen size and other hardware differences.

Strategies for multi-platform development

The key to successful multi-platform development is striking a balance between efficiency and coverage. Here are some strategies to consider.

Cross-compilation decisions

When dealing with multiple platforms, decide if it’s necessary to cross-compile for every platform with each commit. While this ensures up-to-date software for all variants, it can significantly extend the length of the build cycle. Consider reserving certain platforms for daily or less frequent builds to maintain a balance between speed and thoroughness.

Build system setup

Establish a robust build system with dedicated build computers, well-defined build scripts, and effective notification systems. Assign one person to oversee the build system and infrastructure to ensure its reliability and maintenance.

Embrace continuous integration (CI)

Transitioning from a traditional build approach to a continuous integration (CI) system is beneficial in the long run, especially when you’re managing multiple platforms. However CI demands automated builds, comprehensive unit testing, and automated test scripts. Despite this up-front investment, CI pays off by reducing bugs, enhancing release reliability, and speeding up maintenance changes.

Comprehensive testing

As much as possible, incorporate the “hard” testing bits into your automated testing/CI process – in other words, integration and user interface testing. These tests, while more complex to set up, significantly contribute to the robustness of your software. What works flawlessly in an emulated desktop environment may behave differently on the actual hardware, so ensure your testing procedures also include hardware target testing.

Building multi-platform with quality

Developing and testing software for multiple platforms requires a commitment to maintaining quality. For additional insights into ensuring your software’s versatility, reliability, and efficiency across all target platforms, read our best practices guide on Designing Your First Embedded Device: The Development Environment.

 

If you want to learn more about embedded Linux, come talk to us at Embedded World 2024 (9th-11th April) in Nürnberg: KDAB at EW24.

About KDAB

If you like this article and want to read similar material, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

Leave a Reply

Your email address will not be published. Required fields are marked *