在嵌入式linux中使用mono作为硬件

发布于 2024-09-17 20:36:42 字数 585 浏览 1 评论 0原文

我正在一家公司实习做研究。我在使用 Mono(.Net 平台的跨平台实现)时遇到一些问题。我的公司设计硬件和软件。

我对使用嵌入式linux的了解非常有限。我实习的公司非常注重 .NET。但是 Mono 的新发展,他们问自己是否可以将 Linux 瞄准较小的项目,也可以避免为他们设计软件和硬件的人们支付高昂的许可成本。

我已经研究过 mono 可以做什么(以及还不能做什么)。现在我谈到了嵌入的问题。我有点迷失在如何构建嵌入式 Linux 的故事中。

我看到一些故事,他们只是使用一些标准的 Linux 库来在硬件上制作嵌入式 Linux。我还看到存在特殊的 Linux 发行版,例如 uClinux(又名 µClinux)。那么有什么区别,或者只是一样。当我想在目标设备上使用嵌入式 Linux 时,通常的流程是什么样的?

好吧,比单声道部分,所以基本上我希望能够在嵌入式 Linux 中运行 C#。这里主要使用uclinux,我可以使用mono吗?我查看了一些规格,它们没有内存管理单元(MMU)。

所以基本上我担心没有MMU。既然垃圾收集器会如何反应呢?

我希望我没有提出过多的问题,

问候,我已经感谢您阅读它,

本杰明

I am doing research for a company as an internship. I had some question in using Mono, the cross platform implementation of .Net platform. My company designs hardware and sotware.

My knowledge of using embedded linux is very limited. My company where I am doing my internship is really .NET minded. But the new developments of mono, they asking themselves if they can target linux for smaller projects, too avoid the high licensing cost for the people for which they design the software and hardware.

I already looked in to what mono can do (and can't yet do). Now I reach the embedded question. I am kinda lost in the story in how an embedded linux is built.

I saw some stories where they just took some standard linux libraries to make the embedded linux on the hardware. I also saw that there exists special linux distributions like uClinux (aka µClinux). So what's the difference, or is it just the same. What does the process look like typically when I want to use embedded linux on a target deivce?

OK, than the mono part, so basically I want to be able to run C# in embedded linux. Here mostly they use uclinux, am I able to use mono for this? I looked at some specifications, and they don't have Memory Management Unit (MMU).

SO basically I worry about that no MMU. Since how will the garbage collector react?

I hope i didn't give an overload of questions,

Regards, and I thank you already for reading it,

Benjamin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

喜爱皱眉﹌ 2024-09-24 20:36:42

垃圾收集器不依赖于 MMU,尽管如果有 MMU,它的效率会更高。

我们目前利用它来生成空引用异常而不进行检查:在 uclinux 上,您需要启用显式检查(代码已经存在,只需启用即可)。
其他人报告在 uclinux 上使用 mono,尽管可能需要对这里和那里的源代码进行一些调整,因为我们从未在该平台上测试过它(当然,我正在谈论我们已经支持的 cpu 架构上的 uclinux,例如 ARM,您没有具体说明)。

至于其他评论,AOT 和 mkbundle 很大程度上与您的需要无关。您真正想要的是减少单声道占用空间以适应您的设备允许的情况,请参阅 http://www .mono-project.com/Small_footprint 了解更多信息。

如果是我做决定,我总是会选择常规的 ARM Linux 而不是 uclinux 来运行复杂的软件,比如 Mono 或任何需要在 Mono 上运行的程序。

The garbage collector doesn't depend on a MMU, though it can be more efficient if there is one.

We currently take advantage of it to generate null reference exceptions without checks: on uclinux you will need to enable the explicit checks (the code is already there, it just needs to be enabled).
Other people reported using mono on uclinux, though there are likely some tweaks required to the sources here and there since we never test it on that platform (of course I'm talking about uclinux on a cpu architecture we already support, like ARM, you didn't specify).

As for other comments, AOT and mkbundle are largely irrelevant for what you need. What you really want is to reduce the mono footprint to fit into what your device allows, see http://www.mono-project.com/Small_footprint for more info.

If it was me making the decision, I'd always choose a regular ARM linux over uclinux for running complex software like mono or whatever program you need to run on mono.

来世叙缘 2024-09-24 20:36:42

如果您的设备没有 MMU,也许您可​​能想使用 Microsoft 的开源 .NET微框架。它比 .NET/Mono 受到更多限制,并且它是一个解释器,而不是 JIT,但它可以在更有限的硬件上运行。

If your devices don't have a MMU, perhaps you might want to use Microsoft's open-source .NET Micro Framework. It's much more limited than .NET/Mono, and it's an interpreter, not a JIT, but it can run on much more limited hardware.

如日中天 2024-09-24 20:36:42

Mono 的限制可以如您所愿。如果您使用的设备没有 MMU,我会查看 Ahead of时间编译

mkbundle 也可能有效,但我不确定它是否可以在没有一个MMU。也就是说,如果您使用 AOT,您将首先使用 mkbundle 来引入所有依赖项。

Mono can be as limited as you want it to be. If you're using a device that has no MMU, I'd look into Ahead of Time compilation.

mkbundle may also work as well, but I'm not sure that it can do without an MMU. That said, if you're using AOT, you're going to be using mkbundle first to pull in all the dependencies.

旧人九事 2024-09-24 20:36:42

如果您的公司希望通过 MONO 定位嵌入式 Linux 板,并且所需要做的只是转移一些已经在桌面 Windows 计算机上运行的应用程序,那么您可能会遇到很少的问题。但是,如果您想与某些 IO、I2C、SPI、1-Wire 和其他外设通信,则通过 MONO 访问它们时会遇到问题,并且您可能需要制作一些转换器(可能用 GCC 编写),这将是真实硬件和 MONO 应用程序之间的网关。

If your company wants to target embedded Linux boards via MONO, and all that is needed is to transfer some application that already runs on desktop windows computer, then you will probably have very little problems. But if you want to talk to some IO, I2C, SPI, 1-Wire and other peripherals, you will have a problem to access them via MONO and you will probably have to make some translator (probably written in GCC) that will be a gateway between real hardware and your MONO application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文