有可用的 FreeRTOS 解释语言库吗?

发布于 2024-08-28 01:54:57 字数 338 浏览 8 评论 0原文

我在一家公司工作,该公司使用 FreeRTOS 为多个设备创建固件。最近,我们对新功能的要求已经超出了我们固件工程师的工作能力,但我们现在也无力雇用任何新人。即使进行微小的更改,也需要固件人员在非常低的级别上进行修改。

我一直在为 FreeRTOS 寻找某种解释性语言项目,它可以让我们在更高级别上实现新功能。理想情况下,我希望最终得到一些东西,以便设备变得更接近通用计算机,我们编写驱动程序,而不是我们必须自己实现每个功能。

是否有任何 FreeRTOS 项目可以解释 java、python 或类似的字节码?

我看过谷歌,但由于我自己不是固件工程师,我不确定我是否在寻找正确的关键字。

谢谢大家

I work for a company that created firmware for several device using FreeRTOS. Lately our request for new features has surpassed how much work our firmware engineers are capable of, but we can't afford to hire anyone new right now either. Making even tiny changes requires firmware people to go in and modify things at a very low level.

I've been looking for some sort of interpreted language project for FreeRTOS that would let us implement new features at a higher level. Ideally I would like to get things eventually so the devices become closer to generic computers with us writing drivers, rather than us having to implement every feature ourselves.

Are there any FreeRTOS projects that interpret java, python or similar bytecode?

I've looked on google, but since I'm not a firmware engineer myself I'm not sure if I'm looking for the right keywords.

Thanks everyone

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

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

发布评论

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

评论(4

决绝 2024-09-04 01:54:57

我认为如果代码是可移植的,那么 RTOS,甚至操作系统,在这里都不太重要。取决于您的输入和输出方案,您可能需要做一些移植。

关于可嵌入脚本语言,我熟悉的两种是 LUAPAWN

我认为 Python 和 Python 都有不同的版本。其他此类语言也移植到嵌入式系统,但它们往往是嵌入式 Linux 变种。根据您的平台(不知道是带有 8K ROM 的小型 MCU 还是嵌入式 PC),这可能是一种选择。

I don't think the RTOS, or even the OS, matters too much here if the code is portable. Depending on your input & output scheme, you'll probably need to do a little porting.

Regarding embeddable scripting languages, the 2 I'm familiar with are LUA and PAWN.

I think there are versions of Python & other such languages ported to embedded systems, but they tend to be the embedded Linux variety. Depending on your platform (no idea if it's a little MCU with 8K ROM or an embedded PC) that might be an option.

丑疤怪 2024-09-04 01:54:57

没有任何解释性语言是为使用 FreeRTOS 或任何其他微控制器线程库(在 e2e 社区中宽松地称为“RTOS”)而“制造”的。

然而,我在嵌入式系统中使用过的第一手语言(a)用 C 语言编写,并且(b)足够小以嵌入微控制器中,包括:

  • LUA(几乎适用于任何东西,甚至某些 PIC)
  • Python(适用于无论如何,大多数 ARM 架构都有超过 1mb 的内存)

我没有第一手的经验,但 Ruby 可能像 Python 一样容易嵌入。

There are no interpreted languages out there that are "made" to use FreeRTOS, or any other microcontroller threading library (loosely called an 'RTOS' within the e2e community).

However, languages which I have first hand experience using in embedded systems that are (a) written in C, and (b) small enough to embedded in a microcontroller include:

  • LUA (suitable for almost anything, even some PICs)
  • Python (suitable for most ARM architectures, anyways, with more than 1mb ram)

I do not have first-hand experience with it, but Ruby may be as easy to embed as Python.

乜一 2024-09-04 01:54:57

您可以尝试寻找适用于您的特定微控制器或一般微控制器的任何解释器,而不是寻找特定于 FreeRTOS 的解释器。或许可以将它们与 FreeRTOS 连接或将解释器转变为任务。

似乎有人试图在 FreeRTOS 上使用 Lua (图32)。

Instead of looking for FreeRTOS-specific interpreters, you might try looking for any interpreters for your particular microcontroller, or microcontroller in general. It might be possible to interface them with FreeRTOS or turn the interpreter into a task.

There seems to be someone trying to go for Lua on FreeRTOS (pic32).

后来的我们 2024-09-04 01:54:57

我想您的问题最终归结为寻找提高低级 RTOS 机制之上的抽象级别的方法。虽然解释型语言确实比 C 语言工作在更高的抽象级别,但通过应用基于事件驱动框架和状态机的方法,您可以做得更好。这种事件驱动的框架已经存在了几十年,并且已经在各种领域的无数嵌入式系统中得到了证明。如今,几乎每个能够生成代码的嵌入式系统建模工具(例如,Rational-Rose RT、Rhapsody 等)都包含这种状态机框架的变体。

但事件驱动的状态机框架也可以在没有大型工具的情况下使用。例如,QP 状态机框架 (state-machine.com) 可以完成传统 RTOS 可以做的所有事情,而且效率更高,此外还有许多 RTOS 无法做的事情。

当您开始使用带有状态机的现代事件驱动编程范例时,您的问题将会改变。您将不再与 15 级复杂的 if-else 语句作斗争,并且不再担心信号量或其他此类低级 RTOS 机制。相反,您将开始在更高的抽象层次上思考状态机以及状态机之间交换的事件。在经历了这种飞跃之后,您将永远不想回到原始的 RTOS 和意大利面条式代码。

I guess your question boils down ultimately to finding ways of increasing the level of abstraction above the low-level RTOS mechanisms. While it is perhaps true that interpreted languages work at somewhat higher level of abstraction than C, you can do much better than that by applying methods based on event-driven frameworks and state machines. Such event-driven frameworks have been around for decades and have been proven in countless embedded systems in all sorts of domains. Today, virtually every modeling tool for embedded systems capable of code-generation (e.g., Rational-Rose RT, Rhapsody, etc.) contains a variant of such a state-machine framework.

But event-driven, state-machine frameworks can be used also without big tools. The QP state machine frameworks (state-machine.com), for example, do everything that a conventional RTOS can do, only more efficiently, plus many things that an RTOS can't.

When you start using modern event-driven programming paradigm with state machines, your problems will change. You will no longer struggle with 15 levels of convoluted if-else statements, and you will stop worrying about semaphores or other such low-level RTOS mechanisms. Instead, you'll start thinking at a higher level of abstraction about state machines and events exchanged among them. After you experience this quantum leap, you will never want to go back to the raw RTOS and the spaghetti code.

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