Closed olegsavelos closed 2 years ago
We are excited to share that going forward, there is one OS release for Windows for IoT, Windows 10 IoT Enterprise that can address these needs.
I might be interpreting this wrong but it makes me worry there will be no more IoT Core for RPi unless it's ARM64.
@miloush I dont think that this issue has anything with Windows IoT. The topic here is adding dotnet support to armv6 processor so we can run dotnet on Raspberry Pi Zero.
@realivanjx indeed my bad
From reading above it seems ARM6 support is unlikely due to work needed for thumb instruction set. Anyone else have experience running dotnet core on other low cost hardware like Orange Pi Zero?
The PR #657 to add ARMv6 was closed...
Came here because of a .NET Core project we need running on a RPi Zeros at the school as we have about 25x RPi Zeros purchased for this project. We don't have, nor are we going to buy 25 new RPi 3s because .NET Core doesn't support ARMv6.
Guess I'll re-write the project in Golang...
@eduncan911 Try going the mono route. Here's some details.
Net6 should support multiple cpu architectures via mono runtime. maybe.
I'm running more than thousand ARMv6 cpu devices via mono. 3 years ago we introduced ARMv7 hardware, still on mono, but now we are refactoring and migrating to Net core/ net standard, so only small executable will be different and libraries are reused between mono and net core.
Same here. I run the scoreboards at Lord’s cricket ground from pi 1 and Pi B+ using Mono. The newer kit runs off Pi 3 using Net Core. Same source files, with a core object that does the work. In the framework and core apps it just creates the service object and loads the app config into it.
Bryan Crotaz Silver CurvE
Unfortunately mono is full of bugs. Bugs no one will ever probably fix. Most of them network related. For example on some networks when dns is available but normal traffic has a problem - https/ssl streams has a memory leak which could eat whole memory. Or mono could not communicate on some network without playing with MTU size. But python or NET Core doesn't have problems communicating.
Surprisingly, mono is sometimes faster than net core, at least on ARMv7. Not always, but I expected that net core would win performance race by a huge margin.
I find it hard to believe that Mono is full of bugs, but it could depend upon application. Blazor WASM is implemented in Mono and if there were network related issues that would be a major problem.
cc @marek-safar
I run mono on several thousand machines and many network configurations. These bugs does not occur on every machine and network configuration. They have the same linux image.
MTU size problem - 0.3% of installations - on these network is 100% reproducible. I have completely no idea why. But ssh works on these networks and the fact that I have to change mtu size was discovered only by accident.
SSL Stream memory leak - 2% of installations. It was very hard to reproduce, in the end we succeed to reproduce it with 4G router with consumed data, so only dns is working, other request doesn't work. But we couldn't simulate it with tcp error simulator on normal lan network. We use 4G router and specific SIM card to simulate that leak. Usually happens on installation with 4G or other wireless networks. It seems that if in case of establishing TCP & HTTPS connection TCP handshake doesn't complete, it creates a leak.
From time to time we encounter a bug, sometimes it's fixed in short time, sometimes we workaround them and once I've fixed it in mono and pull request was accepted (also related to network) :) But to be fair, this week I found (and reported) a bug in NET5 RC1. To me mono is excellent piece of software (I work with it for 9 years) but has some glitches in network code.
Fair enough, but to characterize Mono as full of bugs is a little unfair. The 4G router/SIM card combo certainly seems like an edge case, I'd encourage you to create an issue on Mono repo and provide as much info as possible. Even if it doesn't get resolved at least others with the same issue can discover the bug. Thanks for your previous contributions to the Mono/NET5 repos.
Ok, sorry, it's unfair.
But we just lost several hundreds man hours finding why some installations have these problems. Mono is especially usable for short lived apps - like mobile. We have some installations where we have more than a year uptime, but sometimes it's problematic.
@michaldobrodenka btw your testimonial is very interesting !
Will ARMv6 support be included in .NET 6.0 ?
Richard Lander mentioned something about it in the comments of .NET 5 Preview 4 announcement https://devblogs.microsoft.com/dotnet/announcing-net-5-preview-4-and-our-journey-to-one-net/#comment-5958
My thinking with that is that we'd use Mono for Armv6 as part of .NET 5.0. We most all the Mono/Xamarin related projects to 6.0. I'm hoping that we can fund a Mono Armv6 build in 6.0.
Adding my vote for armv6 support! +1
@phooey did you intend to post to this issue?
We need this to run on the new Raspberry Pi Pico microntroller.
@robertsundstrom Raspberry Pi Pico does not run linux
@realivanjx Yeah, right. I was thinking of native compilation for that hardware. Wrong thread.
@robertsundstrom you could use NanoFramework
@richlander Just to clarify you comment on the release of .NET 6 Preview 1, is it the case that Armv6 support will not be included in .NET 6, or that -specifically- Mono's implementation of Armv6 will not be included?
Dreaming about this almost every night
Any updates? ARMv6 support?
@richlander ARMv6 support is more than only R Pi 1/Zero/Compute module - it's also about embedded world with iMX devices etc.
this would be such a game changer for IOT and raspberry pi zero
^^
I've resigned myself to the fact that it's not coming.
My workaround is to target .NET 4.7.2 and compile IL code and then run it with MONO on Arm6.
problem is, mono has been lagging behind in terms of language version support and it's really disappointing to give up records, switch expressions, pattern matching, async streams, ranges, null-coalescing assignment, and so on... as well as all the performance improvements. Not to mention using mono isn't always the smoothest ride...
I completely agree with this statement!
I've resigned myself to the fact that it's not coming.
My workaround is to target .NET 4.7.2 and compile IL code and then run it with MONO on Arm6.
I have mono running on thousands IoT devices (ARMv6) and for a new project I wouldn't choose it again. First problem is that it almost abandoned project, has many bugs, mainly in network code, especially everything with SSL/HTTPS in long run, but not limited to SSL - and they will be probably fixed only if you fix them. Second problem is that you are stuck with C# 7.3 (8 with hack) and Nestadard2.0 (2.1 with hack). In future more and more libraries will be unusable because they will target NET6/7/8 TFM. And also poor debugging/diagnostics compared to dotnet
I still hope, that MS will keep up to its promise and using mono VM will make dotnet multiplatform. So I'm hoping that after release of .NET6 will target more platforms.
Second option if you have to use ARMv6 (eg some embedded HW) is not to use c#. Use Rust (or Java, C++ or js...)
Using mono on ARMv6 is feasible only for proof of concept, demo.
My workaround is to target .NET 4.7.2 then you have to use older versions of nuget packages and it means extra hours for me to maintain the code compile for 4.7.2 and net5.0 at the same time... if possible at all. Digging for packages still compatible with 4.7.2 is sometimes like time travel, bringing me 8 years back. Ok .. I had more hair then but that is the only plus point of it, I guess.
Just look at what Richard Lander has written on .NET 6 Preview 1: https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-1/#comment-8452
I'd rather see and updated RPi Zero, since they have declared that 32-bit is soon to be dead, and 64-bit is the way forward.
There are approximately 20 million Pi 1,2 and Zero boards already out there
Raspberry pi compute module along with other ARMv6 boards are still in use in embedded segment
+1 on armv6 support.
If JIT is the issue, then it's not an issue as far as I remember. .NET MicroFramework supported JIT and was ported to just about any popular micro in 2014, including armv6.
I know it's not nearly as extensive as the Core JIT, and it would take work, but it's certainly not impossible. Also highly beneficial to IoT
+1
What about Pi Zero 2 W (https://www.raspberrypi.com/news/new-raspberry-pi-zero-2-w-2/)? It has the same connectors, so it should work as a replacement for Pi Zero (1).
@Misiu AFAIK, the Cortex-A53
is an ARMv8 chip
Yep, it's ARM64
as detailed in review of Raspberry Pi Zero 2 W and it has the same form factor as Pi Zero 1 which is great news for .NET Core developers.
+1
How hard is it to use dotnet with monoVM for ARMv6? Are there some steps to follow how to wire it together?
@janvorli @jkotas Now, when NET6 support using monoVM runtime, it should be easier. MonoVM for 32bit linux-arm could be compiled for ARMv6 - which should be fordward compatible with ARMv7. And so if anyone wanted to use NET6 on ARMv6, just use self contained app with -p:UseMonoRuntime=true
@marekdovjak Have you already tested this and does it work?
I've tested only my app using -p:UseMonoRuntime=true
, but it doesnt work (Seg fault). MonoVM is probably compiled for ARMv7
@directhex Please take a look at what it would take to provide an ARMv6 mono runtime.
Is there any effort in place to bring support for the ARM6 platform? I think the PI Zero is perfect platform for lots of different IOT projects and it would be quite a shame if there is no support for it.