linguini1 opened a new issue, #18507: URL: https://github.com/apache/nuttx/issues/18507
### Description Note: proposal adapted from PDF format to markdown, original available below: [Fully_Porting_NuttX_to_the_Raspberry_Pi_4B.pdf](https://github.com/user-attachments/files/25820279/Fully_Porting_NuttX_to_the_Raspberry_Pi_4B.pdf) # Fully Porting NuttX to the Raspberry Pi 4B Matteo Golin, [email protected], [email protected] A GSoC 2026 Proposal to Apache NuttX March 7th, 2026 _This document serves as Matteo Golin's proposal to Apache NuttX for the 2026 Google Summer of Code. The Raspberry Pi 4B is a powerful SoC-based board running on the ARM64 architecture. Its wide variety of on-board peripherals and position as a popular hobbyist device makes it an ideal board for the NuttX RTOS to both attract new users and showcase its capabilities and scalability. This project will build on top of the initial port of NuttX to the Raspberry Pi 4B to add support for more peripherals, stabilize existing support and begin an initiative of comprehensive demo configurations that showcase NuttX's abilities on a flagship hobbyist device._ # Motivation The Raspberry Pi 4B (and really, all of the Raspberry Pi line-up) is quite a popular device amongst hobbyists. It is versatile in the sense that it may be used as a full "personal computer" running Linux, and also has the ability to interface with typical MCU peripherals/breakouts via SPI, I2C and UART interfaces. This versatility is a large contributor to its popularity among a wide range of hobbyists for robotics, cloud projects, and more. In fact, the Raspberry Pi 4B (and recently the Pi 5) has been a device of focus for Blackberry QNX as part of the QNX Everywhere initiative [1]. The Pi acts as an accessible device to attract developers capable of working with the QNX RTOS. Ideally, the Raspberry Pi 4B will play a similar role for NuttX: a ubiquitous hobbyist device which has a number of interesting peripherals to showcase NuttX's capability as an RTOS. In addition, it is an example of one of the "extremes" that NuttX is capable of operating in: a large memory, multi-core, powerful 64-bit SoC (in contrast to the wide array of supported microcontrollers). This makes it an ideal candidate device for attracting new contributors and reaching more users. It can also serve as a good testing target for regression testing due to its ability to test multiple peripheral drivers and OS functionality in a single, fully-featured image. # Contributor Qualifications Matteo Golin is currently a student at Waterloo University in Canada, where he is enrolled in an MASc of electrical & computer engineering with a focus in aeronautics. He holds a B.Eng in computer systems from Carleton University. Matteo has a passionate interest in embedded systems, encompassing both firmware, software and hardware design. Matteo is a long-time contributor to the Apache NuttX RTOS, of which he is now a member of the PMC, with 91 patches (and counting) to the kernel [2]. Many of Matteo's contributions to NuttX stem from his rocketry projects, where he has designed and manufactured multiple open-source flight computers (including Pygmy [3], [4], [5]) based on the NuttX RTOS. These contributions have included bug fixes, documentation patches, sensor drivers and a few initial ports to different boards (the Xiao Seeduino [6], the Elegoo Mega2560r3 [7], etc.). Matteo is responsible for all of the existing NuttX support for the BCM2711/Raspberry Pi 4B, which he has worked on prior to becoming a committer/PMC on the project [8], [9]. As such, he is uniquely positioned to continue this port as he already has an intimate working knowledge of the existing work. # Proposed Timeline & Work An existing tracker of work to be completed for the Raspberry Pi 4B port can be found under the `nuttx` repository's "RPi4B" milestone. [10] Most of these issues are tracked by Matteo already. There are anticipated challenges for this proposal as described in the [challenges section](#anticipated-challenges) to be aware of. The anticipated project size is 350 hours (large). ## May 1 - May 14 This time chunk will tackle stability challenges of existing support and some of the low-hanging fruit remaining for the port: * Support (in the form of drivers) for all PL011 UART interfaces on the Raspberry Pi 4B will be added. This should allow users to connect a wider array of peripherals. * Patch existing I2C driver to properly support `I2C_M_NOSTOP`, `I2C_M_NOSTART` flags which are needed to allow the full set of NuttX-supported I2C devices to interface with the Raspberry Pi * Patch existing EMMC2 interface driver to support $>1023$ byte write operations, which will fix the failing `sdstress` program and stabilize SD card storage support * Configurable framebuffer video resolution ## May 15 - June 1 This portion of the timeline will be dedicated to supporting USB input to the Raspberry Pi 4B via the 4 on-board USB input ports. The goal of this support is to allow users to connect USB HID devices (mice, keyboards) for interaction with the system. By the end of this time chunk, USB keyboards and mice should be able to interface with NuttX running on the Raspberry Pi 4B. This opens the door for other USB-based devices on NuttX. ## June 2 - July 1 This portion of the timeline will be exclusively dedicated to implementing networking support on the Raspberry Pi 4B. It is anticipated that this will be the largest challenge due to vague documentation (see [Anticipated Challenges](#anticipated-challenges)) and the complexity of networking interfaces. The network support will be added for either WiFi or Ethernet, but likely not both. Which one is implemented will depend on which has more available resources (in terms of documentation), and the first few days of this time chunk will be dedicated to making that determination. The goal of this portion of the project is to have the full NuttX networking stack function on the Pi. This will be verified with the existing NuttX networking applications: * `ping` tests pass * A RPi4B hosted web server can be accessed from another network device * TCP/UDP client/server tests pass * Telnet tests pass ## July 2 - July 14 This portion of the project is dedicated to creating a number of user demo configurations. These demos are intended to attract new contributors and users to NuttX by putting the capability of the RTOS on display and leveraging the peripherals of the Raspberry Pi 4B. All demo configurations will come with documentation so new users can easily set them up and try it for themselves. Proposed demos (each one is a deliverable): * Telnet demonstration of networking support * DOOM port using `doomgeneric` [11] with HDMI video display and USB input device support for playing * LVGL dashboard app that monitors pressure and temperature from a barometer (BMP280 will be used for testing, but will support any generic uORB barometer) to demonstrate video output capabilities meshed with embedded applications Matteo has already carried out a port of Doom to the Pi 4B running QNX using `doomgeneric` [11] as a starting point, so he is familiar with the basic requirements/porting process. This application should attract a number of new users, as DOOM is a popular benchmark for embedded systems and is a "fun" application to play with. <div> <img src="https://static0.howtogeekimages.com/wordpress/wp-content/uploads/wm/2025/10/the-original-doom-game-running-on-a-raspbery-pi-with-a-portable-monitor-and-a-keyboard.jpg?q=70&fit=crop&w=1600&h=900&dpr=1"/> Figure 1: An example of how running DOOM on the RPi4B would look [12] </div> If the Dropbear/SSH client port to NuttX goes well (another GSoC project), that will be included as a demo configuration as well to showcase how the system can be interacted with remotely for completing tasks (i.e. checking logs). ## July 15 - August 1 This portion of the port will be dedicated to achieving functional audio support on the Raspberry Pi 4B's audio jack. When this is achieved, it will be added to the DOOM port from the previous time chunk so that users can enjoy audio accompanied game-play. This task is completed when: * NuttX audio player applications function correctly on the RPi4B * The DOOM port outputs audio ## August 2 - August 24 The final chunk of time for this project will be dedicated to achieving "true kernel" support on the Raspberry Pi 4B. This will add support for `CONFIG_BUILD_KERNEL` so that processes on NuttX will be implemented like Linux processes and can leverage the MMU. This task also includes a working SMP implementation on the Pi 4B so that users can leverage the full compute power of all four ARM cores. This task will be completed when: * SMP testing passes and indicates that all four cores are in use * OS test passes when `CONFIG_BUILD_KERNEL` is enabled # Anticipated Challenges The BCM2711 SoC, used by the Raspberry Pi 4B, is quite poorly documented. The board itself and some peripherals (such as the Ethernet chip and USB hub) are also similarly obfuscated. Not all interfaces are described in sufficient detail in the datasheet to complete a fully-featured driver implementation for all interfaces [13]. Some interfaces, like the EMMC interface, needed consultation with the BCM2835 datasheet to get a working implementation [9]. It is anticipated that much of the proposed functionality will require consultation with existing hobby projects, "ancestral" chipsets (like the BCM2835), the Linux kernel and online forums in order to figure out implementation details (what registers exist, which interfaces peripherals are accessible from, etc). The tasks laid out in this proposal are possible, as open-source projects which support these peripherals do exist, but will be challenging to reverse-engineer. As a result of these difficulties, there is a chance that some difficult features will only receive partial implementation as part of this project. If these challenges inhibit the tasks in this proposal, Matteo's intention is accumulate as much useful information/resources as possible on the interfaces and document them under the respective issue trackers. He will also provide as much of the implementation as possible to be extended in the future. The hope is that this will significantly reduce the burden for future contributor(s) and allow the work to be completed (likely also by Matteo) after the official GSoC project period ends. # Potential Benefits By the end of this port, NuttX will have a fully-featured Raspberry Pi 4B port complete with demo configurations (not least of which will be DOOM) to demonstrate its scalability to large, powerful systems and to attract new hobbyists to the RTOS. However, the potential benefits extend beyond just that: * A fast and capable NuttX device which can act as a USB host opens potential for all kinds of USB device support in the kernel. For example, this board can host an RTL SDR which opens up an infinite number of communications applications (Pi-based radio with audio output, Pi-based air traffic monitor, Pi-based receiver for radio telemetry, etc.). This combination has already been used by researchers for TPMS monitoring [14] as shown in Figure 2 and could now be achieved with the NuttX RTOS. * The RPi4B will be a graphics capable embedded device, which can be used for displaying GUIs, dashboards and taking user input in a public-facing embedded system while still leveraging NuttX's RTOS features. The Pi's powerful SoC would allow it to handle heavier workloads in embedded contexts such as networked kiosk/terminal-like devices. * Since the Raspberry Pi 4B encompasses a large subset of NuttX's feature set (Ethernet/WiFi networking, Bluetooth, video, audio, USB, I2C, SPI, UART, EMMC, SMP, etc.) and also has a large memory capacity (up to 8GB), it is a perfect target for testing NuttX with single builds in systems like NXDART. Jumbo configurations could be made for this device which encompass all of these features and test them comprehensively in a single image, reducing test infrastructure workload. NuttX would have a commercially available and widely owned flagship board for testing requirements. * The Rasbperry Pi 4B opens the door for robust industrial applications that aren't achievable for the NuttX supported MCU lineup, such as drone controllers, rocket ground systems with video output, industrial control applications, multimedia systems, etc. A completely novel field for NuttX would be machine-learning based applications that require a combination of RTOS features and a large RAM bank for on-device models. NuttX could become a viable choice for SLAM robotics, machine vision projects, cube satellites, etc. with this ability. <div> <img src="https://www.rtl-sdr.com/wp-content/uploads/2026/03/tpms_research.jpg"/> Figure 2: Raspberry Pi and RTL-SDR used for TPMS monitoring [14] </div> All in all, having a complete port of NuttX on the Raspberry Pi 4B as proposed in this project would push the boundaries of the systems which NuttX typically operates on. It would unlock a new frontier of applications and potential user-base via a capable SoC and an already popular board. This project is the perfect way to demonstrate what NuttX is capable of, how well it scales from small to large systems, and push NuttX into new markets. # References [1] “Quick start target image (qsti),” Accessed: Mar. 5, 2026. [Online]. Available: https://www.qnx.com/developers/docs/qnxeverywhere/com.qnx.doc.target_images/topic/qsti/intro.html [2] Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/apache/nuttx/pulls?q=is%3Apr+is%3Amerged+author%3Alinguini1+ [3] M. Golin, Pygmy, Nov. 11, 2024. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/linguini1/pygmy [4] M. Golin, Pygmy-nx, Jan. 2, 2025. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/linguini1/pygmy-nx [5] M. Golin, Pygmy-telem, Feb. 13, 2025. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/linguini1/pygmy-telem [6] M. Golin, Support for the Seeed Studio XIAO SAMD21, Nov. 6, 2024. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/apache/nuttx/pull/14678 [7] M. Golin, boards/avr/atmega: Added Elegoo Mega2560r3 board support, May 25, 2025. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/apache/nuttx/pull/16443 [8] M. Golin, Add support for the BCM2711, Dec. 17, 2024. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/apache/nuttx/pull/15188 [9] M. Golin, bcm2711/sdio: Support for EMMC interfaces on the BCM2711, Oct. 28, 2025. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/apache/nuttx/pull/17245 [10] RPi4B Milestone. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/apache/nuttx/milestone/7 [11] ozkl. Accessed: Mar. 5, 2026. [Online]. Available: https://github.com/ozkl/doomgeneric [12] J. Gloor, “How to Run DOOM on Your Raspberry Pi,” Oct. 22, 2025. Accessed: Mar. 7, 2026. [Online]. Available: https://www.howtogeek.com/how-to-run-doom-on-your-raspberry-pi/ [13] “Raspberry Pi BCM2711 ARM Peripherals,” Feb. 5, 2020. Accessed: Mar. 5, 2026. [Online]. Available: https://pip-assets.raspberrypi.com/categories/545-raspberry-pi-4-model-b/documents/RP-008248-DS-1-bcm2711-peripherals.pdf?disposition=inline [14] “Exploring the Privacy Risks of Tire Pressure Monitoring Systems with RTL-SDR,” Apr. 6, 2026. Accessed: Mar. 7, 2026. [Online]. Available: https://www.rtl-sdr.com/exploring-the-privacy-risks-of-tire-pressure-monitoring-systems-with-rtl-sdr/ ### Verification - [x] I have verified before submitting the report. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
