从FreeRTOS的运行应用程序 [英] Running applications from freeRTOS

查看:538
本文介绍了从FreeRTOS的运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在开发消费电子产品是我公司开发的操作系统的进程。我在FreeRTOS的落户为骨干为我们的操作系统,和我勤奋工作,以实现在操作系统中的硬件功能。不过,我遇到了有关从内部运行FreeRTOS的第三方应用程序的问题。

I am currently in the process of developing the OS for a consumer electronics product my company is developing. I have settled on freeRTOS as the backbone for our OS, and am working diligently to implement hardware functionality within the OS. However, I have run into an issue concerning running 3rd-party applications from within freeRTOS.

本来我认为一个任务是应用程序,在那里基本上你有myapplication.c和myapplication.h包含所有应用程序所需的功能和code将驻留在for(;;)循环在该任务中(作为主while循环)。然后,当用户决定运行该应用程序,一个函数指针传递到队列中,我的任务app_launcher然后使用用第三方任务或应用程序来创建新的任务。

Originally I considered a task to be an application, where basically you had "myapplication.c" and "myapplication.h" containing all your applications necessary functions and the code would reside within the for(;;) loop within the task (acting as a main while loop). Then when the user decides to run that application, a function pointer is passed to a queue, that my app_launcher task then uses to create the new task using the 3rd-party task or application.

与然而这种方法的问题,是在OS将已经编译和驻留在微控制器,以及与被安装和删除,用户认为合适...所以很明显的应用需要被从OS编译且可执行的应用程序。在一个标准的UNIX机器,我会使用类似叉子,选择可执行文件,并给它自己的过程。但是我找不到内FreeRTOS的一个类似的功能。我的其他的想法将至为应用程序开发的脚本语言,但我再次不知道如何启动这些应用程序...

The problem with this approach however, is the OS will already be compiled and reside on the microcontroller, and applications with be installed and deleted as the user sees fit... So obviously applications need to be compiled and executable from the OS. On a standard unix machine, I would use something like fork, to select the executable and give it it's own process. However I cannot find a similar functionality within freeRTOS.. My other idea is approaching a scripting language for app development, but again I'm not sure on how to launch those applications...

所以,问题是,我怎么FreeRTOS的运行从尚未出炉到操作系统第三方开发的应用程序?

So the question is, how do I get freeRTOS to run applications from 3rd party developers that aren't already baked into the OS?

推荐答案

由于要求,这里是各地,我发现我的问题的工作。这个问题是从启动FreeRTOS中其他应用程序。这是通过利用在newlib文库系统()函数来完成的。因此,我可以把闪光灯的应用程序,直到它的需要,然后使用所提供的newlib功能启动。这也使我能够动态地启动程序,没有硬编码应用程序的code或名字,我只需要提供系统()用字符串,指向内存中的应用程序的位置。

Due to request, here is the work around I found to my problem. The issue was launching other applications from freeRTOS. This was accomplished by utilizing the "System()" function in the newlib library. Thus, I can place an application in flash until it's needed, then launch it using the newlib functions provided. This also allows me to launch programs dynamically, without hard coding the code or name of the application, I just need to provide System() with a string, pointing to the app's location in memory.

这篇关于从FreeRTOS的运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆