Can a team working with various microcontrollers (MCU) and microprocessors (MPU) find a way to save resources and optimize workflows? One answer to this question comes from Crank Software, a member of the ST Partner Program. The globally-focused Canadian-headquartered company is famous, in part, for Storyboard, a cross-platform framework for embedded GUI developments.
As the video below shows, the tool enables the creation of sophisticated and engaging interfaces. Developers can even try demo images for STM32 MCUs and our MPUs to start testing the environment in minutes. The demo images are also a great example of the framework’s ability to bring a similar UI to a wide range of components. Therefore, the images serve as an object lesson to engineers looking to migrate from an MCU to an MPU and vice versa.
The challenges of migration
Working with a wide range of components has many advantages. Instead of shoehorning consumers into a particular system, engineers can better customize what they’re offering. However, working with various microprocessors and microcontrollers also comes with greater challenges, such as porting projects to different platforms. As a result, teams must adapt to different peripherals, computational throughput, power management systems, and more. Crank offers a solution to this issue. Thanks to its framework, companies can work on one application that will span across a wide range of devices. Developers can thus save money, reduce their time to market, and enjoy greater flexibility.
Crank Storyboard: The road between MCU and MPU
Storyboard and STM32
Let’s examine some of the portability challenges associated with using different hardware platforms more closely. One of the most time-consuming problems is the need for a rewrite to account for different peripherals, hardware IPs, memory configuration, and more. The task itself is pharaonic, which explains why companies seldom undertake it. Furthermore, even after making the application run on multiple platforms, developers must optimize it, which is especially crucial in resource-constrained systems. Crank circumvents all this by using runtime engines designed for specific platforms and with Storyboard, which moves the optimization burden onto the runtime engine. For instance, by choosing the right plugins, developers can tailor the modules they run to avoid wasting resources.
More concretely, the Crank framework can take advantage of things like ST’s ChromART IP or customize the application’s memory footprint. Moving from an MCU to an MPU also becomes more straightforward since the framework adapts to the new architecture. For instance, the STM32MP1 has a 3D accelerator that opens the door to far richer interfaces. However, some cost-effective versions of STM32MP1 come without the GPU. By using Storyboard, engineers don’t have to worry about it and can release to market faster. Similarly, moving from an MPU to an MCU is also vastly simpler as the engine addresses differences in operating systems, RAM management, and more.
Storyboard and Validator
With the latest version of the Storyboard, Crank added Validator, an integrated automated testing framework, enabling developers to render GUIs (whole screen or regions) against a baseline image. The framework thus ensures consistency between multiple runs or to spot differences when running on different hardware. It also helps developers track changes in the execution time of certain tasks (performance tests) after hardware changes. The documentation team can then use the same screen captures, which significantly saves time and guarantees the use of the latest screenshots. As developers must constantly update and tweak interfaces, it not only vastly simplifies interactions among teams but guarantees users no longer struggle with outdated UIs when reading manuals or guides.
Validator also offers the ability to record a video of the automated GUI tests, which makes documenting a failure vastly easier. When the test sequence is successful, the footage can serve as a demo video for the feature tested. Consequently, showing off new functionalities or creating how-tos to make users more proficient becomes much easier. As the tool renders MP4 recordings of the Storyboard app executed in the computer-hosted simulator, it also means that developers don’t have to point a camera at a display and suffer flickering or artifacts. It increases production value and makes for a better-looking presentation.
Storyboard and the industry
Another example of Storyboard’s flexibility is its Lua scripting callbacks. Developers working on an MPU often use Lua because of its powerful and fast nature. However, Storyboard enables programmers to switch to a C function callback to adapt to a more memory-restricted MCU. The feature exemplifies how Storyboard uses a fixed data model to represent elements on screen rather than a code generation system. Crank’s paradigm also explains the framework’s flexibility, which, in turn, opens the door to new applications.
Crank shared how their teams are witnessing developers of entry-level systems use videos to improve the user experience. By employing a display and a flipbook-style interface, they can demonstrate how to use certain functionalities. Previously, such a feat was impossible on an MCU. It would have been too resource-intensive, and developers who had previously used beefier systems would struggle when porting them to more cost-effective MCUs. Similarly, audio interface makers that relied on microprocessors for their interface now tend to adopt STM32 MCUs. Today, by using Storyboard on an STM32 MCU, engineers can vastly improve the experience without needing an expensive microprocessor that would blow up the bill of materials.
Conversely, IoT products that previously relied only on STM32 MCUs are now using an STM32MP1 to benefit from the additional computational resources while using Storyboard to facilitate the transition and reduce their time to market. This is even more so now that the STM32MP1 can run a real-time operating system, thus bridging the gap with the MCU world. Engineers can take advantage of the power of an MPU while using the same tools and OS as they do when coding for an STM32 MCU. In this instance, Storyboard can also help teams transition to a more cost-effective system, thus opening them to new markets.
Crank Storyboard: The journey from proof-of-concept to product launch
What to do and not to do at the beginning
As we sat down with Crank, the company advised engineers. One of them was to start with the build image. It’s very easy for teams to get bogged down in documentation or roadblocking implementation issues. Evaluation boards solve all these problems by offering a working proof-of-concept with replicable examples. They jumpstart a project, enabling designers to test their GUI early, which provides invaluable feedback and hastens development. Crank also explained that choosing a common starting platform for all projects reduces friction. It is often simpler and more efficient to begin on a familiar machine and define the application’s specifications later than to try to guess what a program will need early in the process.
On the shoulders of giants
Another essential advice to remember is to be wary of underlying complexities. Some companies may be reluctant to use a tool like Storyboard, and they may decide to do everything from scratch. However, ST and Crank work closely together because we know that optimization operations can get complex. Our collaboration ensures that anyone working on an STM32 product can extract all available performance without spending months or years on their source code. It also frees teams to work with customers on features that will genuinely distinguish them. Moreover, working with Storyboard ensures teams can repurpose a GUI on a different platform without recompiling the codebase.