Brazil hosted the first in-person official event of Espressif targeting developers: Espressif Summit Brazil 2024 occurred in Campinas, Brazil, in the last 17-18 August. During these days, we had amazing talks, demonstrations and workshops! Me (Tiago) and my co-worker, Filipe, talked about NuttX on the first day of the event.
My talk, entitled “Introduction to NuttX”, happened on the first day of the event, August 17th, in the late afternoon. I tried to prepare a system overview other than the usual “ getting started” guide.
In summary, I divided the presentation into three different parts:
wasm
(WebAssembly) and run on NuttX’s wamr
(WebAssembly Micro Runtime);
A demonstration of how a complex problem could be easily overcome using NuttX and its POSIX-compliant interface: a wireless sound card using NuttX and the ESP32-S3-Korvo-2 board demonstration took place;Yes, we tried to bring a live demonstration during the talk and - against all the gods of the live demo - it worked!
The talk content can be accessed on tmedicci.github.io/esb24-nuttx/ (in Portuguese):
Don’t worry, I will write about it soon in English
Any presentation requires some preparation, right? While preparing the Introduction to NuttX talk and its demonstration, some issues were identified. We are used to providing support for NuttX’s kernel, device drivers and POSIX-compliant interfaces, but experimenting with product development and system integration provides a great opportunity to test the features that other developers use while they are designing products using NuttX.
Specifically, during this presentation, I was able to identify three issues and provide support for a new board in NuttX.
iwasm
(WebAssembly Micro Runtime) uses fstat
to get the file’s status (the app compiled to WebAssembly). This POSIX-compliant interface should return OK
when fstat
is successful [1]. This, however, was not happening. The fix can be seen in PR #12790
One of the most interesting features of NuttX is its ability to load applications dynamically. The so-called ELF loader enables developers to compile applications externally and run them on NuttX during runtime. This is done by transferring the externally compiled app to the firmware - either by attaching an external flash memory or SD card or by downloading it using the network - and running the application dynamically. As expected, before running the application, it needs to be loaded to a memory location that can execute instructions.
However, some SoCs have different instruction and bus data to access the same memory location and these buses may have different access permissions. On ESP32-S3, for instance, the instruction bus needs to be accessed word-aligned. So, during the app’s load phase - when it is copied to the memory - this must be done using the data bus to enable copying byte by byte (instead of using the instruction bus address that could only be accessed word-aligned). The interfaces that enable loading the application using the data bus are provided in PR #12795.
Due to its audio-related features, the ESP32-S3-Korvo-2 board was used for the live demonstration during the talk. Its initial support was submitted to NuttX’s mainline in PR #12813:
Some photographs of the Espressif Summit Brazil 2024:
The images are from Fabio Souza [2], Gabriel Heidorn [3], Ilo Rivero [4] and Radim Karniš.