Raspberry Pi Pico support #47270
Replies: 9 comments 15 replies
-
Ooh, those are seriously cool! Now for the bad news... .NET Core sadly does not support ARMv6 (which if I'm not mistaken, is what those boards are gonna be using with those Cortex M0+ cores.) This is what blocks it from running on the Raspberry Pi Zero as well. (See #7764) There was a work-in-progress PR to add support, but it ran into issues: #657 Mono does support ARMv6, although I'm not sure the extent or if it works with Mono AOT. The final issue you're going to run into that those boards are meant to run code without the help of a conventional operating system. (At least that's the impression I got.) Overcoming that isn't an insurmountable task, but it's not exactly trivial. There are various projects out there for running .NET at that low of a level (Cosmos in particular comes to mind), but that's not the sort of thing that tends to be very portable.
Yes, .NET Runtime Native AOT Lab. (Previously called CoreRT) However it uses the runtime JIT compiler as an AOT compiler, so it has the same lack of ARMv6 support. There's also Mono AOT. |
Beta Was this translation helpful? Give feedback.
-
Hi guys, I just want to know it is possible to make a wifi camera like ESP32 with the new Raspberry Pi pico and then can be work on MotionEyeOS? About ESP32 Thanks Regards Ivan |
Beta Was this translation helpful? Give feedback.
-
I’m thinking of a subset of the BCL API surface and supporting GPIO and devices through dotnet/iot. I guess, it could be achieved with an optimized Mono runtime and native compiled app. |
Beta Was this translation helpful? Give feedback.
-
Although coreclr supports thumb2 instruction , the code of coreclr is not friendly and cannot be tailored. Ecma-335 has such a description:
Ironically, Microsoft didn't realize this function. In fact, what we want is very simple: a very small CLR, which only includes:
) |
Beta Was this translation helpful? Give feedback.
-
You're not going to run .NET or .NET Core apps, but you could port .NET Micro to it and use C#.NET. This eats about 60k of RAM and some 200k of program flash, which is significant, but the Pico isn't an Arduino Nano and has plenty of these resources by comparison. |
Beta Was this translation helpful? Give feedback.
-
@RobertSundstrom are you interested in any specific APIs? @Ellerbach has run .NET IoT on top of nano framework and it apparently works great for the most part, I'm not sure if Pico would work but might be worth checking with him if he has any pointers for you |
Beta Was this translation helpful? Give feedback.
-
We are currently in an effort to add Raspberry Pico to support .NET nanoFramework. See: https://github.com/nanoframework/. .NET nanoFramework allows you to run .NET code written in C# on micro controllers. There is already a large support of MCU like ESP32, STM32, TI and NXP and some associated platforms, and it gets larger over time. .NET nanoFramework is community driven so the efforts goes as as fast as the community can go. If you have one of the supported MCU like a simple ESP32, give it a try! There is a current work to add support for PiCo on the Azure RTOS branch: https://github.com/nanoframework/nf-interpreter/tree/develop-azurertos/targets/AzureRTOS The main key elements are functional but nothing like GPIO, SPI or I2C is implemented yet. There is work to take. So if you are interested, you're welcome :-) Now, on the .NET side, what you can run on a very little processor is of course limited. So the implementation of .NET in there is made small and efficient. Still, you can use Visual Studio 2019 to debug your code running on such devices with break points, getting the value data. And you use nugets as well and all the love you have in C# (9.0 supported) :-) Now, there is no generic (yet), no async or Linq. |
Beta Was this translation helpful? Give feedback.
-
Thank you all for the answers! I was talking about having an API surface that is compatible with dotnet/iot. But since I have read that there is an effort to bring nanoFramework closer to .NET “proper” in terms of functionality and APIs, I will wait an see with excitement. Being able to target the Pico without code changes would be cool. |
Beta Was this translation helpful? Give feedback.
-
What does it takes to get .NET apps to run on a Raspberry Pi Pico microcontroller?
The chip has an Arm Cortex M0+ CPU and 2MB on-board flash memory.
Is there some effort in doing native compilation?
Beta Was this translation helpful? Give feedback.
All reactions