Initial Renode support for Ambiq Apollo4 Blue
Published:
Topics: Open source tools, Open networking
For many years now, Antmicro has been helping its customers build physical device systems based on a wide variety of System-on-Chips. Many of these projects involve the use of the Renode open source framework, which offers a great advantage in product development and testing in all stages of the product life cycle, from pre-silicon prototyping to continuous integration and interop testing in field-deployed devices.
Based on yet another ongoing customer project, one of the most recent additions to the extensive catalog of SoCs supported in Renode is Apollo4 Blue from Ambiq®, a US-based SoC vendor specializing in energy-efficient and wireless-enabled designs for IoT endpoints such as smart home appliances, far-field voice remotes, and wearables.
In a nutshell, Renode lets you design and test complex, multi-node environments virtually. The simulation in Renode consists of SoCs built from various peripherals and CPUs, based on ARM, RISC-V, or other ISAs. These SoCs can, in turn, be combined with various sensors and external devices, forming complete virtual boards that can be connected with wired or wireless connections.
Renode ships with a variety of SoC models for different MCUs and Ambiq’s Apollo4 Blue is now part of that portfolio, enabling the development of both single devices and complete, interconnected systems.
Initial support for Apollo4 Blue in Renode
The simulation capabilities for Ambiq’s Apollo4 SoC in Renode currently cover a subset of the I/O available, which was important to Antmicro’s customers, but naturally, the goal is to implement more comprehensive support for the platform as additional use cases present themselves.
As of now, Renode provides a platform description and models for a set of peripherals:
- GPIO controller
- System timer
- CRC32 engine
- SPI controller
- Power control
- RTC
- ADC
Together with generic support for ARM Cortex-M peripherals like interrupt controller, bit-banding, etc., this already constitutes a capable platform, allowing you to develop and test your software within a simulated, fully controlled environment.
To see the full list of peripherals, you can take a look at the Apollo4 repl platform file.
Running your software on Apollo4 Blue in Renode
Renode comes with a ready-to-run demo script that you can use to run software for the Apollo4 Blue easily.
To do it with the latest nightly build of Renode, use the following command in the Renode CLI:
(monitor) start @scripts/single-node/ambiq-apollo4.resc
You will see a UART window pop up, with the sample output greeting you with a “Hello, World” and some additional information:
Hello World!
Vendor Name: ????
Device type: Unknown device
Device Info:
Part number: 0x00000000
Chip ID0: 0x00000000
Chip ID1: 0x00000000
Revision: 0x00000000 (Rev? )
MRAM size: 524288 (512 KB)
DTCM size: 393216 (384 KB)
SSRAM size: 1441792 (1408 KB)
Trim Rev 0
App Compiler: GCC 10.3.1 20210824 (release)
HAL Compiler: GCC 10.3.1 20210824 (release)
HAL SDK version: 4.2.0
HAL compiled with CMSIS-style registers
SECURITY INFO
=============
Reset Status: 0x0
SBL version: 0xFFFFFFFF - 0xFFFFFFFF, INFO0 invalid
SBR version: 0xffffffff
Device LCS: Undefined
SBL Staging Area: 0xffffffff
SOC Id:
0x00000000 : 0x00000000 : 0x00000000 : 0x00000000
0x00000000 : 0x00000000 : 0x00000000 : 0x00000000
Secure Debug Certificate Location: 0x00000000
SBR OPT Address: 0x00000000
DEBUG INFO
==========
Could not enable debugger
If you want to pass your own ELF file to be executed instead, you can provide it before loading the script:
(monitor) $bin=@path/to/your.elf
(monitor) start @scripts/single-node/ambiq-apollo4.resc
You can also use the renode-test
utility to run the test suite dedicated to Apollo4 Blue:
$ renode-test tests/platforms/ambiq-apollo4.robot
Preparing suites
Started Renode instance on port 9999; pid 1369353
Starting suites
Running tests/platforms/ambiq-apollo4.robot
+++++ Starting test 'sdk-examples.Should Successfully Run hello_world_uart Example'
+++++ Finished test 'sdk-examples.Should Successfully Run hello_world_uart Example' in 3.71 seconds with status OK
[...]
Tests finished successfully :)
Build your wireless products with Antmicro and Ambiq SoCs
Antmicro provides its customers and partners with a wide spectrum of engineering services that can help you benefit from an open source methodology, and the many development features of Renode, including a number of capabilities focusing specifically on wireless and IoT use cases. If you would like to build your next product based on Ambiq’s silicon, the open source SoC models described here are a great starting point. We’re always happy to learn about specific use cases, so don’t hesitate to reach out to us at contact@antmicro.com.