dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.22k stars 4.72k forks source link

Arm6 Raspberry PI Zero - PI 1 #7764

Closed olegsavelos closed 2 years ago

olegsavelos commented 7 years ago

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.

janvorli commented 7 years ago

No, there is no such effort. Probably the biggest problem that would need to be solved is that JIT doesn't support ARM6 Thumb instruction encoding.

olegsavelos commented 7 years ago

So what should i expect ? Is there is any chance there will be commitment from the community or MS to bring Arm6 support or the only way is Mono ?

alberk8 commented 7 years ago

I would be fantastic if there is support for ARMv6 cpu like Pi Zero and Pi Zero W. For some use cases there is no need to use a more powerful ARMv7 like Pi 3.

pksorensen commented 7 years ago

Would love to see ARMv6 supported :)

ivpadim commented 6 years ago

I agree you should include support for ARMV6. I want to run dotnet core in the Pi Zero right now I'm stuck with mono.

jklaus commented 6 years ago

Any word on armv6 support? I have two pi zeros just waiting for a purpose..

dcuccia commented 6 years ago

@janvorli If the JIT is the problem, could we expect .Net Core on CoreRT to enable this?

mikedn commented 6 years ago

@dcuccia CoreRT uses the same JIT compiler as CoreCLR so the problem remains.

janvorli commented 6 years ago

@dcuccia, @mikedn the corert has a mode in which it compiles into C++, so that could solve the problem. However, I have lost track on how much stuff actually works in that mode. @jkotas can you please provide some details on that?

jkotas commented 6 years ago

CppCodeGen runs simple programs (hello world, etc.). From https://github.com/dotnet/corert#platform-support : The big missing features are reflection, garbage collection, and exception handling.

I agree that CoreRT + CppCodeGen would a good option for platform reach.

pksorensen commented 6 years ago

@jkotas Do i read this correct - following the example from corert -> https://github.com/dotnet/corert/tree/master/samples/WebApi i can compile that with cppCodeGen and it can run on my rasp pi zero?

Or will it still fail due to only having ARMv6 ?

jkotas commented 6 years ago

CppCodeGen is too incomplete for WebApi sample. Reflection and garbage collection would have to work first.

pksorensen commented 6 years ago

thanks @jkotas - but then a hello world and some basic IO/httpclient stuff will work?

jkotas commented 6 years ago

httpclient is a pretty complex piece of code. You can give it a try, but I doubt that it would work with CppCodeGen today.

nhuurnink commented 6 years ago

Is there any intention of providing the support for ARMv6?

metanoic commented 6 years ago

I'm also very interested in seeing ARMv6 support. It seems that core is getting close, however I'm not qualified to judge well.

shravan2x commented 6 years ago

Adding my +1 for ARMv6 support. The price gap between rPi0w and rPi3 is $25, making the Pi Zero W far more useful for IoT projects where a lot of devices are used. Is it possible for us to reuse some code from Mono for this?

DoctorWho8 commented 6 years ago

And I am also inclined to agree. There is an even bigger community that wants to run a much better Linux on the Pi, including the Pi Zero then just their community supported releases.

metanoic commented 6 years ago

This goes far beyond the Pi/Zero, for what it's worth. Supporting ARMv6 opens the doors to a vast array of microcontrollers. Having .NET available as a choice in that ecosystem would be of large significance, and would provide substantially more interest/coverage on the IoT aspects of CoreRT.

I would consider this step 1 in a sequence that would eventually see .NET as an option for programming in real-time operating systems. In other words, please don't simply equate ARMv6 support with Raspberry Pi Zero support, as it goes much farther than that in the immediate sense (many other MCU's that use that instruction set, and it's not going anywhere any time soon for low power/cost MCUs), and worlds beyond in the more abstract sense (e.g. seeing a CoreRT PAL target for FreeRTOS or similar).

ghost commented 6 years ago

@metanoic I fully agree with you. And this would help the porting of IoT Edge as well (https://github.com/Azure/iotedge/issues/12)

We should have an IoT Platform in our hands for less than 10$ !

digital-synapse commented 6 years ago

+1

Graveen commented 6 years ago

Agree. Actually i'm stuck with Mono :)

thesoftwarejedi commented 5 years ago

Building some IoT stuff on armv6. Came here sad. Want to add my +1 to this issue.

pmmcmullen94 commented 5 years ago

Anyone have any update on if there's progress being made on this? I just tried thinking it would work as it does on the pi3b+. I forgot that they're two different processors :(

Fieel commented 5 years ago

I have an old Raspberry Pi model B (armv6l CPU) and would love to run some dotnet core projects on it

michaldobrodenka commented 5 years ago

I have many mini servers based on ARMv6 CPU with Linux & Mono. Would like to switch them to .NET core.

outruller commented 5 years ago

Would also vote for armv6 support! +1

apead commented 5 years ago

+1 for armv6 support!

geeknz commented 5 years ago

+1 would be nice to have

mms- commented 5 years ago

YES!

shand-obs commented 5 years ago

Please!

albertodall commented 5 years ago

It would be really great!

mms- commented 5 years ago

Just curious, is there a technical reason why for example the Go runtime can compile to many architectures using the same compiler, yet for CoreCLR it seems a much longer process to add arch support? https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63

janvorli commented 5 years ago

@mms- yes, there is a technical reason. Go is precompiled. It has two compilers - gc that supports only x86 (32 and 64 bit) and arm and gccgo that GCC as its backend. So whatever architectures are supported by GCC, they get them for free. CoreCLR uses JIT, so we are on our own to add support for new architectures.

mms- commented 5 years ago

Makes perfect sense. Would be interesting if .Net Native could be expanded to enable this same pathway for .Net Core on these other architectures where JIT doesn't exist yet.

mpearon commented 5 years ago

Adding my vote for ARMv6

bickycheese commented 5 years ago

We need this!

TwoTenPvP commented 5 years ago

ARMv6 has a ton of appeal beyond Raspberry Pi Zero. Raspberry Pi Compute Module 1, for example, runs ARMv6 and it makes it much safer to rely on dotnet. Currently the Mono runtime has to be used which is fine, but proper dotnet support is something I really would like.

danmoseley commented 5 years ago

@richlander

NetGH commented 5 years ago

ARMv6 support would be awesome.

BryanCrotaz commented 5 years ago

Can anyone explain why Core needs JIT and so can't run on Armv6, but Mono can? Surely Mono has JIT as it only needs IL code to run - that has to be JITted to the local CPU?

janvorli commented 5 years ago

Can anyone explain why Core needs JIT and so can't run on Armv6, but Mono can?

Mono has a different JIT that supports Armv6. CoreCLR JIT doesn't support it. ARM has two instruction sets - ARM and THUMB. ARM v6 has THUMB, ARM v7 has THUMB2. Mono JIT compiles everything into ARM instruction set, so it works on both Armv6 and v7, but that results in approximately 30% larger memory footprint of the code. The differences between Armv7 THUMB2 and Armv6 THUMB are quite large and adding support for Armv6 will require quite a lot of changes to the CoreCLR JIT.

Misiu commented 5 years ago

.NET Core 3.0 is out, 3.1 is just around the corner, 5.0 is planned and it is advertised as a unified platform. Blazor is using Mono, can't JIT be chosen when creating a new project (selecting target), if ARMv7 is selected then CoreCLR should be used if ARMv6 then Mono-like JIT.

Raspberry Pi 4 is at least $35, Pi Zero costs $5, Pi Zero W is $10. So for the price of a single Pi 4 You get 7 Pi Zeros!

And as many others wrote before, this isn't just about Raspberry Pi Zero, all ARMv6 devices could run .NET Core apps.

2.5 years later we are still waiting 🙂

santoro-mariano commented 4 years ago

+1

StefanSchoof commented 4 years ago

There is a PR called armv6 support in the runtime project: https://github.com/dotnet/runtime/pull/657

TimZander commented 4 years ago

Please add this support

marclameu commented 4 years ago

I'm waiting for this support too...

ivanjx commented 4 years ago

Armv6 support for net core would be awesome...

CLWNRDW commented 4 years ago

Any word on armv6 support? I have two pi zeros just waiting for a purpose..

Thank

georgikoemdzhiev commented 4 years ago

Please add support for armv6