Initial support for STM32WBA in Renode


Topics: Open OS, Open source tools

The STM32 series from ST Microelectronics is one of the most widely used MCU families in the world, powering thousands of products worldwide, including many that we are helping our customers develop their projects. To test embedded software, projects like ChromiumOS Embedded Controller are using Renode, which allows us to continuously improve the support for that MCU product range in our open-source simulation framework. One of the more interesting STM32 platforms we have recently added as part of a customer project is the STM32WBA, an ARM Cortex-M33-based secure 2.4GHz SoC with Bluetooth 5.3 Low Energy (BLE), suitable for scenarios requiring reliable wireless connectivity. STM32WBA is used in platforms such as the NUCLEO-WBA52CG.

This blog note provides an overview of the newly simulated platform and showcases practical demos you can run on your local machine.

Initial support for STM32WBA in Renode

Simulating STM32WBA in Renode

Thanks to the wide range of platforms already available in Renode, implementing support for the STM32WBA did not require modeling all of its components from scratch. Renode’s building-block approach allows you to easily find similarities between platforms and build new ones from existing elements, significantly speeding up the development process and creating new platforms based on the latest hardware.

While many elements of the STM32WBA platform are based on the previous STM32 boards, Antmicro has developed platform-specific peripherals specifically for the new MCU:

The simulated platform also includes other peripherals such as UART, GPIO, ADC, SPI, IWDG, timers, and a platform description for the NUCLEO-WBA52CG development board. To get started, you can run a Robot Framework test suite on the simulated board locally in a few simple steps.

Assuming you are using Linux, run the following commands to download the newest version of renode-portable and add it to the PATH:

$ mkdir -p renode-portable && wget -qO- | tar -xzf - -C renode-portable --strip-components=1
$ export PATH=$(pwd)/renode-portable:$PATH

Then, you can install test dependencies and run the test suite:

$ pip install -r renode-portable/tests/requirements.txt
$ renode-test tests/platforms/nucleo_wba52cg.robot	

The test suite will perform simple checks of the UART, GPIO, and EXTI peripherals by activating a simulated button on the dev board, as well as verify that both polling and interrupt modes of the SPI work as expected.

Alternatively, to run the board interactively in Renode, use the following command:

$ renode -e 'mach create; machine LoadPlatformDescription @platforms/boards/nucleo_wba52cg.repl'

For Windows or MacOS, you can install Renode from a package suitable for your system or build Renode from source.

Renode for interactive firmware co-development

When working with cutting-edge hardware like the STM32WBA, the time it takes to build a working prototype of a platform is critical. Renode has advanced prototyping capabilities such as support for Python peripherals that allow you to quickly develop a simplified version of a device for rapid development turnaround.

Adding support for the platform early in its lifecycle allows the developers to use simulated STM32WBA boards interchangeably with physical hardware to avoid availability constraints and provide a way for developers to isolate bugs and fix them more easily using comparative analysis. Renode can also benefit your project if you are migrating from one hardware platform to another, as you can use the framework to simulate both platforms side by side (or even automate it in a CI pipeline) to ensure feature parity.

Future developments

In the near future, Antmicro is planning to add wireless capabilities to the STM32WBA Renode platform to enable BLE-based use cases. In addition, we plan to cover typical use cases envisioned for the STM32WBA, such as multiple boards forming a mesh network in an IoT system.

Modeling and simulating cutting-edge hardware with Renode

Renode is a flexible framework that allows you to simulate the latest hardware to develop firmware in interactive and controllable environments, even at the pre-silicon stage. Its modular structure allows you to develop simulation models for state-of-the-art hardware platforms using reusable components and spanning multiple architectures, including ARMv8-A or RISC-V.

We can help you expand your simulation-based testing infrastructure by developing Renode simulation models for devices based on custom or newly released hardware such as the STM32WBA. If you are interested, contact Antmicro at

See Also: