2

I'm trying to figure out if .Net Core 3.1 will run on an Orange Pi Zero.

I need to create an app for it which reads/writes to both the serial port and GPIO ports, and since the only programming language I know is C#, my two options are Mono or .Net Core. I'd prefer .Net Core if possible...

From what I've read, for .Net Core to run on an ARM CPU, the CPU must be at least ARMv7. I see the Orange Pi Zero uses an AllWinner H2 SOC, which has an ARM Cortex-A7 CPU, which implements the ARMv7-A architecture. So I think it should work... Could anyone please confirm this? Thanks

Fabricio Rodriguez
  • 3,769
  • 11
  • 48
  • 101

1 Answers1

2

Based on

  1. https://github.com/dotnet/iot/issues/751
  2. http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=2408

looks like it runs.

  • Thank you. Based on point #1 it looks like it might indeed work, yes. I'm not sure about point #2 as they talk about the Orange Pi PC which is different to the Orange Pi Zero. For example, from what I've read,.Net Core runs on a Raspberry Pi, but not on a Raspberry Pi Zero. But I'm feeling more confident now. Thanks BlueCompany! – Fabricio Rodriguez Jul 09 '20 at 04:02
  • The H2+ is a stripped-down version of the Allwinner H3 used by the Orange Pi PC. If this is working on an H3, it should work on an H2+ as well I guess. The Raspberry PI Zero, as well as the original Raspberry PI, are using an old Arm core. The most recent models are using either a Cortex-A7 or a Cortex-A53. This may be why .Net Core is not working on the Raspberry PI Zero. – Frant Jul 09 '20 at 16:52
  • 1
    Thanks for your comment Frant. I took a chance and bought the Orange Pi Zero. I installed Armbian Focal on it, installed .Net Core, and copied a "Hello World" .Net Core 3.1 console app I wrote on my pc to it. I then SSHed into the Orange Pi Zero, and executed the program ("dotnet HelloWorld.exe")... and.... It worked! It printed "Hello World" on the screen! :) – Fabricio Rodriguez Jul 13 '20 at 19:52
  • I'm now busy writing the full program - which will read/write to the serial port and GPIO pins. Hopefully I won't have any issues... – Fabricio Rodriguez Jul 13 '20 at 19:55
  • @Fabricio Rodriguez: you are welcome. By the way, what are the tools you did use for compiling your test program ? thanks. – Frant Jul 15 '20 at 00:55
  • I used Visual Studio 2019 Community. I simply created a console project, built it, and copied the bin folder to the Orange Pi Zero. Then I ran it with the command "dotnet HelloWorld.dll" (after having installed .Net Core 3.1 first of course.) – Fabricio Rodriguez Jul 15 '20 at 05:08
  • @Fabricio Rodriguez: thanks a lot - I have tried a similar approach, but Core 3.1 for armv7 complained the .net executable was not matching my run-time architecture. Do I need to install an additional SDK for armv7-a to my vanilla Visual Studio 2019 Community Edition ? I will try again using your instructions anyway. – Frant Jul 15 '20 at 17:43
  • You're welcome. Let me know if you come right, or if I can help you in any way. P.s. I installed both the .Net Core 3.1 runtime and SDK on the Orange Pi Zero. Not sure if both were needed? – Fabricio Rodriguez Jul 15 '20 at 17:48
  • One other thing - I read somewhere that not only does your ARM processor have to be at least a V7, but it must also support "neon" (Whatever that is). Basically .Net Core requires vfpv4d32 floating point, which apparently implies "neon" – Fabricio Rodriguez Jul 15 '20 at 17:51