To improve the accessibility of our content, please find the audio version of this blog post.
Moving from prototyping to production has its challenges, one of them being programming firmware onto systems. Indeed, flashing one board during development is straightforward. However, installing code on a myriad of devices simultaneously is a whole different process. One answer to this problem takes the form of the GangFlasher-ST, an in-circuit programming software tool from Elprotronic, an ST Authorized Partner. Until now, the tool was only compatible with the STM32MP1, but the Canadian company recently announced support for the STM32L4, STM32L5, and STM32H7.
GangFlasher-ST and the Journey From Development to Production
From 1 Target to 8 Targets, 40 MB/s, with Support for Secure Provisioning on STM32 MCUs and MPUs
With one license of GangFlasher-ST, engineers can flash up to eight targets simultaneously while competing alternatives work on one target at a time. On the STM32MP1, the software can also reach download speeds of up to 40 MB/s per target. The GangFlasher-ST is thus ten to twenty times faster than a standard DFU-USB connection. The software is also compatible with secure provisioning mechanisms like Secure Secret Provisioning (SSP) on the STM32MP1 and Secure Firmware Install (SFI) on compatible STM32 microcontrollers. Today that means the STM32L5 and the STM32H7 but support for more STM32 SFI MCUs is on the way.
From STM32CubeProgrammer to GangFlasher-ST
As we sat down with Elprotronic, Adam Czajkowski, its Vice-President, explained that customers were the ones requesting support for ST microcontrollers. Indeed, most engineers working on an STM32 are familiar with ST tools such as STM32CubeProgrammer. The latter serves them well as a flashing and debugging tool during development. For instance, developers can access certain sections of the memory, update registers, and more. However, the STM32CubeProgrammer license doesn’t cover a production environment because the utility is not suitable for such a use case. Hence, once teams move onto prototyping, they need a platform that can flash their board rapidly and efficiently. That’s what Elprotronic aimed to accomplish with the GangFlasher-ST. Originally, the tool only supported the STM32MP1. However, customers soon requested support for STM32 MCUs as well, which led to the recent update.
From a Development Board to a System-in-Package
The GangFlasher-ST solves another issue that receives less attention but is increasingly important. When working on an STM32MP1, teams often move from an ST development board to a custom board rapidly. System-in-Package makers, like Octavo, another ST Authorized Partner, can be a tremendous help. Indeed, they can work with customers to hasten developments. However, because of the custom nature of a board from Octavo programming it is quite different from simply using STM32CubeProgrammer with an ST platform. Hence, to simplify the in-circuit programming process on a SiP, the GangFlasher-ST micro Linux kernel can take the device tree from the manufacturer and automatically flash the STM32 MPU with all the proper partitions. The fact that the Elprotronic utility automates the process makes the use of a system-in-package even more practical.
GangFlasher-ST and the Exploration of the Developers’ Workflow
Looking at the Micro Kernel
To reach 40 MB/s on the STM32MP1, Elprotronic relied on its expertise in USB drivers and OpenSTLinux. The company used ST documentation, the Yocto Builder, and the OpenSTLinux Developer Package to build a microkernel. The Linux environment contains drivers and tools that take full advantage of the USB 2.0 port. Hence, instead of being limited to the 2 MB/s of a standard DFU-USB connection, the link can reach up to 40 MB/s in real-world conditions. As Adam explained, Elprotronic used the STM32 MPU Wiki and our documentation to hasten developments. Additionally, he told us our work with the open-source community meant OpenSTLinux was close to a traditional Linux distribution. As a result, the Canadian developers could use familiar tools that simplified their workflow.
Studying the STM32HSM Support
While the micro Linux kernel is necessary to reach 40 MB/s, all other features are available on the STM32 microprocessors and microcontrollers. Recently, the GangFlasher-ST even got support for SSP and SFI. Put simply, developers can use an STM32HSM to encrypt their firmware, then use the tool from Elprotronic to decrypt it inside a compatible device. GangFlasher-ST can also monitor and limit the number of programmed STM32 devices to ensure a manufacturer doesn’t misplace a board.
Owning the Multithreaded Management
Another advantage of the GangFlasher-ST is that it can adapt to a wide range of production setups. Teams with minimalist needs can even get a version of the software for Raspberry Pi and create an efficient setup. On the other hand, it’s possible to go all out. Elprotronic can target more than one board because it worked on multithreading its application. Put simply, there’s one thread per target and one master thread that serves as a conductor. Typically, one classic system will need one license, which will cover eight devices. However, some customers do buy multiple licenses and create powerful rigs to increase their output vastly. Elprotronic even offers floating licenses to help companies that need more flexibility.
The best way to try GangFlasher-ST would be to grab an STM32 evaluation board like the STM32MP157F-EV1, NUCLEO-H753ZI, or NUCLEO-L552ZE-Q, which supports Secure Boot. Elprotronic offers a 15-day free trial version of its software to help evaluate it. There’s also a more cost-effective license for up to 2 targets for smaller projects.