Matheus Castello's Port Brings .NET nanoFramework to the Raspberry Pi Pico, More RP2040-Based Boards

Castello's work brings the .NET nanoFramework to the Raspberry Pi Pico, ahead of an official port — though it's very experimental.

Gareth Halfacree
3 years agoProductivity

Developer Matheus Castello has successfully ported the open source .NET nanoFramework, designed to encourage desktop C# developers to take a look at the world of embedded devices, to the low-cost Raspberry Pi Pico — and, by extension, other RP2040-based microcontroller boards.

When we covered the project five months ago, hardware support for the .NET nanoFramework was thin on the ground: A handful of STMicroelectronics development boards, two Texas Instruments Launchpad boards, Espressif's ESP32 family, the M5Stack Atom, and the NXP MIMIXRT1060-EVK.

Those interested in porting the platform to other devices were advised to look for at least an Arm Cortex-M or ESP32 processor, 64kB of RAM, and 256kB of flash storage — and it did not escape Castello's notice that the RP2040 at the heart of the Raspberry Pi Pico has two Arm Cortex-M0+ cores, 264kB of static RAM (SRAM), and is connected to 2MB of flash storage.

In its early stages, this .NET nanoFramework port brings C# support to the Raspberry Pi Pico. (📹: Matheus Castello)

"This one is an unofficial port," Castello notes of his work, a month in the making. "It's something I'm working on weekends and during my free time, something 'EXTREMELY EXPERIMENTAL.' I'm not being funded by any group or institution for do[ing] this."

The Raspberry Pi Pico port of the .NET nanoFramework builds on Castello's earlier port to Linux and the NuttX real-time operating system (RTOS). It's also only partially complete: Support for using the general-purpose input/output (GPIO) pins is included, with I2C compatibility due to land soon, but no word yet on when — or if — the port will receive support for other peripherals, including the programmable input/output (PIO) blocks.

"We already know that the .NET nanoFramework core team is working on a Pi Pico port for Azure RTOS," Castello writes. "My experiments are valid (I think) as proof of concept for the POSIX port of the nanoFramework.

"Working at this port we can run nanoCLR on an arsenal of 67+ microcontroller boards of different architectures, which NuttX supports (NuttX is a RTOS with great POSIX compatibility), and plus an endless list of platforms and microprocessor architectures that run Linux."

The full write-up is available on Castello's website, including instructions on getting started with the port on your own Pico.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles