Overcoming barriers to embedded development
Many developer tools and supporting hardware and software products have been created to help minimize embedded development risks and accelerate time to market for various products ranging from small consumer devices to high-performance industrial controls and remote sensing equipment. Even getting started can be a challenge because software development is contingent upon hardware being ready. Subsequent integration is subject to many interdependencies between the hardware and software from the device drivers, adaptation layers and OS kernel upwards to the application program interfaces (APIs) and the application itself. Although these issues must be confronted, development teams usually want to concentrate their resources at the application level to create the unique features that will differentiate the product in its marketplace.
To help overcome some of the early hurdles, chip vendors have created development platforms that take out a lot of the hardware design headaches and speed up the process of beginning work on the software. After choosing a platform that provides all the required features and is close to the ideal configuration, the team may fine-tune the hardware as the project progresses, to add unique or value-added features. Ultimately, a custom, miniaturized version of the hardware may be created for production purposes.
On the other hand, a vast selection of single board computers (SBCs) or computer on module (COM) hardware is available, featuring popular processor architectures such as x86, Intel® Atom™, or ARM®, in various miniature form factors such as PC/104 or Mini ITX. These can be used as a platform for software development, and then scaled into production with little or no further modification to the hardware.
Any platform for embedded development needs a board support package (BSP) to provide essential software for controlling features specific to the hardware. The various elements of the BSP include drivers for devices on the board, an adaptation layer to enable the OS to communicate with the board hardware, and a boot loader for loading and starting up the OS. Because these various software components exist to connect the hardware with the OS, creating the BSP depends on knowledge of the OS and its characteristics.
Software choices: The Windows embedded route
Creating an embedded OS image and application software using a framework like Microsoft® Windows® CE, or Windows XP Embedded, has offered product developers the advantage of working within a commercially supported ecosystem. Benefits of this approach include access to off-the-shelf commercial tools like the Visual Studio integrated development environment (IDE), which includes the Platform Builder toolset for designing and building a custom OS image. Developers can customize the OS image by using this tool to select only the required functions from a menu of catalog items and thereby minimize demand for system resources such as memory. There are also lists of ready-made device drivers that can be quickly and easily incorporated, or help to build custom drivers if necessary.
Because the Microsoft Embedded OS kernel and typical behavior are known, third parties such as board vendors can more easily provide needed support like the BSP to help developers get their hardware up and running quickly.
In addition to the BSP, a software development kit (SDK) for the customized OS is needed to help the engineering team create the application software. The SDK provides essential software including a set of application program interfaces (APIs) that allow the application to interact with the OS. The Platform Builder toolset also includes an application wizard that helps the hardware team create basic sample applications and dynamic link libraries (DLLs), which go with the SDK to help application developers understand the OS and create their own custom applications using a tool like eMbedded Visual C++®. Figure 1 illustrates the hardware and software components involved in Windows Embedded CE development.
Figure 1: Windows Embedded software connects the application with the underlying hardware.
Microsoft has recently simplified writing cross-device applications by introducing a standard SDK for Windows CE .NET. This provides a baseline set of components that developers can be sure are ready to use in their devices simply by including the standard SDK as a component in their Windows CE .NET device. Support for the standard SDK is included in eMbedded Visual C++ 4.0 and later.
The Advantech AIMB212D is an example of a hardware platform that is ideal for developing devices based on Windows Compact Embedded (CE) or XP Embedded (XPE), although it is not restricted to Windows Embedded development. The board features a dual-core Intel Atom CPU, PCI and PCie slots, Gigabit Ethernet support, multiple serial and USB ports, and GPIOs. Advantech supports the board with several BIOS options, WinXP and Win7 drivers, utilities, and APIs for low-level sensors and Cloud connectivity using SUSIAccess. More of this later.
Although Visual Studio now supports Linux and iOS development, as well as Windows Embedded, Linux developers have not historically had the benefit of commercially supported tools. Despite this, the freedoms that come with open-source development, and the low up-front costs to engage with Linux, are factors that have enabled Linux to become extremely popular. In fact, the majority of non-desktop computing systems now run on some form of Linux OS.
Even so, developing Linux-based devices could be easier, more efficient and more convenient. It is difficult for a hardware vendor, for example, to create a suitable BSP when the properties of the OS can vary so widely. Initiatives to create standardized embedded Linux distributions have sought to overcome some of these vagaries for hardware developers and hence streamline the intersection of hardware and software development. uClinux is an example of a project aimed at simple microcontrollers. It can be based on the Linux 2.0, 2.4 or 2.6 kernel, and comes with user applications, libraries and toolchains. A microcontroller vendor can create a uClinux BSP to accompany the evaluation board for any given product, and thus provide a faster and easier development path for customers, provided they use the appropriate uClinux port for their chosen microcontroller.
The Yocto Project is an example of another approach that aims to help hardware developers create custom Linux distributions in an environment that combines the freedoms of open source development with the convenience of a commercially supported framework. The project has established common templates, tools and methods, and takes advantage of the Linux Foundation’s long-term support initiative (LTSI) to standardize the kernel. The LTSI provides necessary scope to apply security and bug fixes at a strictly controlled cadence that allows each kernel version to be properly maintained.
Connecting with the Yocto Project can deliver advantages for various types of organizations, including chipmakers, tools vendors, creators of Linux distributions, and embedded device developers. Accordingly, the project is supported by a cross-section of industry players, who are committing personnel and resources to help simplify device development with Linux. The Yocto Project provides an antidote to the fragmentation of Linux build systems and OS implementations, which can complicate product development and hinder the efforts of hardware or software vendors to support their customers. The extra efficiencies enabled by the Yocto Project can also help reduce development costs and accelerate time to market for products that demand high quality assurances, such as automotive modules or carrier-grade telecom systems.
The Digi Connectcore 6UL is an example of an SBC that comes with a complete Yocto Project Linux BSP with source code. The board also integrates support for wireless connectivity including IEEE 802.11a/b/g/n/ac and Bluetooth® 4.2, connectors for adding Grove sensors or expansion boards, and a hardware secure element that supports encryption, key storage and secure boot for protecting connected smart devices.
As a Linux-based OS with the added advantage of support from a large organization, Android has been immensely successful as a platform for smartphones and tablets. Developers can quickly create mobile devices or apps for Android mobiles by using the Android SDK and tools like Android Studio or a third party app development tool. Google is now extending the Android family to include other types of devices: Android Wear is one example, positioned to enable development of wearable electronics like smart watches.
The arrival of Android Things could be an exciting move for developers of embedded systems. Rather like the Yocto Project, the Android Things philosophy saves developers from having to create or modify their own Linux kernel. This promises to make creating applications for small, resource constrained devices as easy as developing a mobile app, and could bring new groups of app developers from the mobile scene into the embedded world. The ready availability of turnkey, certified development boards and the Android Things SDK enable prototyping to start straight away.
The Android Things SDK (Figure 2) supports a subset of the Google Services APIs for mobile development, and removes those that are not suitable for embedded development. Typically, these are APIs that require user input or authentication credentials. On the other hand, the Things support library is added, which introduces APIs for types of hardware that are commonly featured in embedded devices but not in mobiles. These include sensors and actuators connected to GPIOs or interfaces such as I2C, SPI or UART.
Figure 2: Android Things adds extra APIs in the Things Support Library to manage the types of hardware used in embedded devices.
Connecting sensors to the cloud
The ability to capture sensor data from multiple channels, and to aggregate and send to analytics and machine-learning applications in the Cloud, will be critical to future advancement of industrial automation. Applications hosted on connected SBCs like the Advantech AIMB212D and Digi Connectcore 6UL have a key role in the cyber-physical systems of the fourth industrial revolution (Industry 4.0), gathering and forwarding sensor data such as accelerometer signals for vibration sensing, productivity metrics, component traceability data, or quality information such as inspection imagery. Both of these SBCs, among others of course, are certified for connection to the Microsoft Azure Cloud, and come with software to facilitate this.
Advantech provides SUSIAccess™ APIs with its AIMB212D, in addition to embedded software APIs like SMbus and Hardware Monitor for capturing data from connected sensors. SUSIAccess combines Advantech’s secure and unified smart interface (SUSI) for monitoring embedded devices with additional features to support data mining, backup and remote recovery, and helps transfer sensed data to Advantech’s WISE-PaaS IoT software platform that provides services like remote monitoring, device management, analytics and predictive maintenance.
Developers seeking to address similar applications with the Digi Connectcore 6UL board, working in the Yocto-based Linux environment, can take advantage of software extensions developed by Digi to facilitate Cloud integration. These include the Digi TrustFence™ hardware/software-based security framework, support for Over The Air (OTA) firmware updates, and remote device management and health monitoring. Figure 3 illustrates the BSPs and software extensions that comprise the Digi embedded Yocto platform, including support for Cloud integration.
Figure 3: The Digi embedded platform adds software extensions, leveraging the managed nature of the Yocto Project.
Android Things is especially well suited to creating IoT devices, and not only includes APIs for setting up low-level interfaces to temperature sensors, smart cameras, or other sensors, but also provides access to the Weave communication platform to simplify connecting devices to the Google Cloud. Using the Weave device SDK, developers can connect devices to Google’s Weave server, which handles secure device registration, device management, and integration with services like Google Assistant. Setting up and monitoring devices is easy using the Weave Developer Console, and registering as a Weave developer allows access to the Weave Developer app for testing and controlling devices from a mobile device or tablet.
Starting an Android Things project is easy, using a supported board like the PICO-PI-IMX6UL from Wandboard. This is based on the NXP i.MX6 applications processor, and has IEEE 802.11 b/g/n Wi-Fi and Bluetooth 4.1 support built-in, a 4 GB removable memory card, and provides GPIOs, I2C, I2S, UART and SPI for connecting external devices like sensors or controllers. Further connectivity and multimedia expansion are possible.
Designing embedded systems is friendlier and faster with a well-supported SBC that simplifies access to the resources needed to get a system up and running. Even so, the choice of operating system can have a profound influence on the success of the project. Software such as drivers and APIs in the BSP and SDK, and well-supported tools to apply them, help to minimize the work developers must do themselves, and allow greater focus on the differentiating features at the application level.
Initiatives like Yocto Project enable Linux developers to enjoy support similar to that already available to those choosing the Windows Embedded route. Android Things now promises similar benefits and a simplified mobile app development experience for creators of small connected devices.