嵌入式Linux还是eCos?

发布于 2024-08-29 07:57:43 字数 354 浏览 4 评论 0原文

一种看待它的方式是:嵌入式 Linux 从桌面 Linux 开始抛弃了嵌入式系统不需要的部分(这实际上是真的吗?),而 eCos 是为嵌入式系统从头开始设计的。

现在,假设使用 ARM 处理器,可能是 ARM 7 - 性能有影响吗?实际上,我们谈论的是一个非常低负载的系统,每天最多 500 笔交易。

其中一种相对于另一种(或 FreeRTOS 等)有什么优势?稳定性、成熟度、性能、开发工具,还有什么?

我能想到的是,如果我确定我永远不会移植到另一个操作系统,那么如果我使用嵌入式Linux,我不需要操作系统抽象层让我在主机(桌面 Linux 盒子)上进行单元测试。

有什么想法或意见吗?谢谢。

One way to look at it - embedded Linux starts with desktop Linux & ditches the parts not needed for embedded systems (is this actually true?), whereas eCos is designed from the ground up for embedded systems.

Now, assume an ARM processor, probably ARM 7 - does performance make a difference? Actually, we talking a very low load system, max 500 transactions a day.

Any advantages of one over the other (or FreeRTOS, etc)? Stability, maturity, performance, development tools, anything else?

All that I can think of is that if I am certain that I will never port to another o/s, then if I go with embedded Linux, I don't need an o/s abstraction layer to allow me to do unit testing on host (desktop Linux box).

Any thoughts or comments? Thanks.

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

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

发布评论

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

评论(3

唠甜嗑 2024-09-05 07:57:43

我安装 Linux 的每台设备都是从头开始的,而不是某些发行版的精简版本。

eCos 和 Linux 有不同的目标。 Linux 旨在成为一个功能齐全的类 Unix 系统,因此不太关心最低系统要求。 eCos 是一种实时操作系统,专为通常资源受限的系统而设计。这两个操作系统之间有很多重叠之处,并且在许多情况下两者都可以同样良好地工作。

根据我的经验,如果您的系统有足够的资源并且您的要求不简单,那么使用 Linux 进行开发会更快。与 RTOS 开发人员相比,找到有能力的 Linux 开发人员更容易,工具更便宜,进程相互保护,您往往可以更好地了解正在运行的系统等。eCos

的一个(更好的,恕我直言)替代方案是 RTEMS(< href="http://www.rtems.com" rel="noreferrer">http://www.rtems.com)。它存在的时间更长,我上次检查时,支持的架构比 eCos 还要多。它还具有 PC BSP,并在 qemu 下运行以进行仿真。

Every device I've put Linux on started from the ground up and was not a stripped down version of some distribution.

eCos and Linux have different goals. Linux is intended to be a full featured Unix-like system and consequently isn't so concerned about minimum system requirements. eCos is a real time operating system designed for systems that are often resource constrained. There is a lot of overlap between the two OSes and in many situations both will work equally well.

In my experience, if your system has the resources and your requirements are non-trivial, development will go faster with Linux. It's easier to find competent Linux developers than RTOS developers, the tools are cheaper, processes are protected from each other, you tend to have better visibility into the running system, etc.

An (better, IMHO) alternative to eCos is RTEMS (http://www.rtems.com). It's been around longer and last time I checked, supported more architectures than eCos. It also has a PC BSP and runs under qemu for emulation.

骄傲 2024-09-05 07:57:43

在我看来,将 Linux 放在 ARM7 上并没有真正的好处; ARM7 没有 MMU,内存保护是使用 Linux 等操作系统的主要原因。 uClinux 将在没有 MMU 的目标上运行,但是您已经失去了使用 Linux 最令人信服的理由之一,并且仍然需要巨大的内存资源(4M 闪存、16M RAM 将是合理的最低限度)。

许多 ARM7 设备没有外部内存总线来连接那么多内存,片上闪存和 RAM 通常范围为 32K 到 1M,具体取决于设备。

Linux 本质上并不是“实时”的。对于实时功能,它通常与实时内核结合使用,其中 Linux 本质上作为空闲任务运行,或者在具有独立虚拟机功能的目标上运行。因此,如果需要对外部事件进行确定性和快速响应,您将需要一个 RTOS,例如 eCOS。

eCOS 的伟大之处在于它拥有一个庞大的附加功能和设备支持生态系统,可与大多数商业产品相媲美。然而,像 FreeRTOS 这样的东西可能更容易“启动”,但只提供线程调度程序和进程间通信机制。像文件系统或 TCP/IP 这样的东西需要从第三方获取(尽管也有同样适合嵌入式系统的小型且免费的解决方案)。

如果您使用简单的内核,例如 FreeRTOS 或 uC/OS-III,您将不会浪费太多时间,因此投资不会成为下次使用其他内核的障碍。另一方面,Linux 很可能会阻止您下次使用更小、目标更窄的东西,并且后续项目的成本可能远远高于仅仅支持您选择的操作系统所需的成本。

There is no real benefit in putting Linux on an ARM7 IMO; ARM7 has no MMU and memory protection is a primary reason for using an OS such as Linux. uClinux will run on targets without an MMU, but you have lost one of the most compelling reason for using Linux, and still need the huge memory resources (A 4M flash, 16M RAM would be a sensible minimum).

Many ARM7 devices do not have external memory busses for attaching that much memory, and on chip flash and RAM typically range form 32K to 1M depending on the device.

Linux is not intrinsically "real-time". For real-time capability it is often coupled with a real-time kernel, where Linux essentially runs as the idle task, or on targets with the capability as a separate virtual machine. So if deterministic and fast response to external events is a requirement, you'll need an RTOS such as eCOS.

eCOS is great in that it has a large ecosystem of add-on features and device support that rivals most commercial offerings. However something like FreeRTOS are likely to be easier to 'bring-up' but provide no more than a thread scheduler and inter-process communication mechanisms. Stuff like a file system or TCP/IP need to be sourced from third-parties (although there equally small and free solutions suitable for embedded systems for that too).

If you use a simple Kernel such as FreeRTOS or uC/OS-III, you will not have wasted too much time, so the investment is not an inhibitor to using something else next time. Linux on the other hand may well discourage you from using something smaller and more narrowly targeted next time, and tour subsequent projects may cost considerably more than they need to just to support your OS of choice.

你对谁都笑 2024-09-05 07:57:43

99% 的情况下,嵌入式 Linux == Linux。您只需以不同的方式配置内核即可。

性能上最大的差异是,使用 eCos,您可以根据您的实现/配置获得预期的响应时间,而使用 Linux,您则受到中断控制器的支配。

Linux 拥有比 eCos 更大的粉丝群,因此对开发有更多帮助,并且它支持多种 CPU。另外,根据您想要的驱动程序,您可以在运行 Linux 的 PC 上编译并运行您的程序。

Linux 可以检测锁定/死锁并发送自动响应/重新启动以保持系统的高可用性。

Embedded Linux == Linux in 99% of all cases. You just configure the kernel differently.

Biggest difference in performance is that with eCos you can, depending on your implementation / configuration, have an expected response time while with Linux you are at the mercy of the interrupt controller.

Linux has a much bigger fan base than eCos thus more help for development, and it supports a wide array of CPU's. Also depending on what drivers you want, you can compile and run your program on a PC running Linux.

Linux can detect lockups / deadlocks and send automatic responses / reboots to keep high availability of the system.

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