‘Write once, deploy anywhere’: the architecture of SimpleSwitch™

SimpleSwitch™ is our solution that allows the development of embedded software with limited dependency on hardware. Or, to put it simply as we did in our previous video, creates a way to ‘write once, deploy anywhere’. For the purposes of this explainer, let’s assume that ‘anywhere’ is one of our SMARC modules and will be supported by SimpleSwitch.

SimpleSwitch is divided into three parts:

• Software Development Kit (SDK)
• Base images
• The container registry

The SDK will be the only thing you need to install on your computer. It contains all libraries, compilers and tooling that you’ll need to cross-compile projects and deploy them on our SMARC modules.

Using the SDK, developing embedded software becomes as easy as developing a smartphone application. The SimpleSwitch SDK is available for i.MX8, Intel, and QEMU.

For those unfamiliar with QEMU, it is a virtual machine which comes with SimpleSwitch and replicates hardware interfaces and software frameworks which are identical to our SMARC modules. It’s actually a very convenient and cost-effective way of developing software in large teams, where it is not possible to provide a piece of hardware for each engineer. Instead, each can work on a virtual machine and undertake the development as they would do on the SMARC module.

The second element comprises the base images to be programmed onto the SD card or EMMC of the SMARC module. Like the SDK, these images are specific to our supported platforms – which are Intel and NXP at the time of writing. In addition, each is available as either headless or with Weston.

A SimpleSwitch image includes the minimum to boot the board and initialize the display, and then it leads to SSH connections. Then the SDK you install on your computer will allow you (using either a terminal or VS code or a Qt creator) to deploy your applications on the SMARC module, which you’ve programmed with a base image.

Exploring the inner architecture of a SimpleSwitch base image, we will find a standard Linux file system built with Yotco and two specific software stacks that are the source of SimpleSwitch’s power. These stacks make up around 50% of its ‘write once and deploy anywhere’ capability:

The first software stack is the hardware abstraction layer called SimpleCoreIO. It gives a unified way to access the hardware based on the set of UDEV rules, configured either through the DTS or the BIOS.

The second software stack is the container manager and pre-packaged templates for Python, Flutter and Qt. Thanks to the SDK, you can start developing using these pre-packaged environments and deploy the result, a containerized application, independently of the base image over a SSH connection.

Used with high level frameworks such as Qt, Flutter or Python, the remaining 50% is all Linux. Because, by default, Linux already abstracts the system on which it is running.

SimpleSwitch also comes with a container registry that includes many pre-packaged software stacks which can be easily integrated into your project and are very useful for development. This registry includes, for instance, Chromium, COG, Mosquito and MQQT, all of which are easily installed on the target using a single command line. These building blocks can either be integrated by Avnet Embedded or our partners as open or closed source projects.

IoT Connect also resides in the container registry and is a useful data management and ingestion platform. To test IoT Connect, simply pull its container from the registry, set up the credential on the device, and you can immediately begin to send telemetry data to IoT Connect.

In future videos, we will set up various SDK  and program a base image on one of our modules. From here, you will then be ready to start developing your software with SimpleSwitch.

Embedded Software Sessions

Copyright ©2024 Avnet, Inc. All rights reserved.