For faster navigation, this Iframe is preloading the Wikiwand page for FreeRTOS.

FreeRTOS

此条目过于依赖第一手来源。 (2016年12月30日)请补充第二手及第三手来源,以改善这篇条目
FreeRTOS
开发者Real Time Engineers Ltd.
操作系统家族实时操作系统
运作状态活跃
原始码模式可获取原代码
当前版本
  • 202212.01 (2023年3月4日;稳定版本)[1]
  • 202210.01-LTS (2022年11月18日;长期支持)[2]
编辑维基数据链接
市场取向嵌入式装置
支持平台ARM (ARM7, ARM9, Cortex-M3, ARM Cortex-M4, Cortex-A), Atmel AVR, AVR32英语AVR32, HCS12英语HCS12, MicroBlaze英语MicroBlaze, Cortus英语Cortus (APS1, APS3, APS3R, APS5, FPF3, FPS6, FPS8), MSP430, PIC, Renesas H8/S, SuperH, RX, x86, 8052, Coldfire英语Freescale ColdFire, V850英语V850, 78K0R, Fujitsu MB91460 series, Fujitsu MB96340 series, Nios II, Cortex-R4, TMS570, RM4x
内核类别微内核
许可证MIT许可证
官方网站www.freertos.org
仓库 编辑维基数据链接

FreeRTOS是一个热门的[3]嵌入式装置即时操作系统核心[4][5],它于2003年由Richard Barry设计,并已被经成功移植到35种不同的微控制器[6]。FreeRTOS采用MIT许可证许可。

实现

[编辑]

FreeRTOS的设计小巧且简易,整个核心代码只有3到4个C文件,为了让代码容易阅读、移植和维护,大部分的代码都是以C语言编写,只有一些函数(多数是架构特定排班副程序)采用汇编语言编写。

FreeRTOS提供许多方法以实现多线程(threads)、多作业(task)、互斥锁(mutex)、信号量(semaphore)和软件计时器(software timer),有个为低耗电应用程式提供的无嘀嗒(tick-less)模式,线程的优先权管理也有支持,此外,FreeRTOS提供了四种存储器配置的模式:

  • 仅配置(allocate only)
  • 以非常简易但快速的算法进行配置与释放
  • 搭配存储器合并英语Coalescing (computer science),以较复杂但快速的算法进行配置与释放
  • 搭配互斥保护,以 C 函数库配置进行配置与释放

FreeRTOS中没有一些像LinuxMicrosoft Windows等典型操作系统具有的先进特征,例如装置驱动程式英语device drivers、先进存储器管理机制、用户管理和网络管理,FreeRTOS着重在执行的简洁与速度,FreeRTOS有时会被视为是一个‘线程函数库’而非‘操作系统’,尽管可以找到命令行接口和类似POSIX I/O 接口的插件。

FreeRTOS实现了多线程,主程序会在规律的短时间区间内调用一个线程时计方法,这个方法会以循环制依照任务的优先级进行任务切换,一般来说,这个短时间区间介于 1/1000 秒与 1/100 秒之间,透过一个硬件时计中断来计时,但这个区间经常随着特定的应用而改变。

从FreeRTOS官网(FreeRTOS.org页面存档备份,存于互联网档案馆))所下载到的代码包含准备用来移植或编译的配置文件和演示代码,让用户可以快速地进行应用程式设计。

主要特色

[编辑]

支持平台

[编辑]

相关系统

[编辑]

SafeRTOS

[编辑]

SafeRTOS的功能和FreeRTOS类似,但是是为实现安全关键系统所设计。FreeRTOS的机能模型经过完全的HAZOP,其机能模型及API因为用户误用或是硬件失效造成的弱点都已经识别且修正。最后的需求经过完整IEC 61508 SIL 3开发生命周期来实现,也是只有软件的组件可以达到的最高等级。

SafeRTOS是由WITTENSTEIN high integrity systems开发,原开发者 Real Time Engineers Ltd 为其合作伙伴[7]。SafeRTOS和FreeRTOS有相同的调度算法,相似的API,其他方面也相当类似[8],不过是因为不同的目标而设计的[9]。SafeRTOS只用C语言进行开发,以符合IEC61508的认证需求[10]

在操作系统中,SafeRTOS有其独特的地方,是只需要放在微处理器中的只读存储器(ROM)即可,因此可以进行IEC61508或是其他安全或是可靠度相关的完整软件及硬件预认证[11]。若是放在只读存储器中,SafeRTOS代码只能依照原始的配置来执行,因此用这套操作系统的装置的认证测试,不需在安全认证中重新测试其开发的程序[12]

德州仪器会针对其TI Stellaris系列的部分MCU的ROM里加上SafeRTOS[13],因此客户可以将SafeRTOS用在商业应用中,而不用采购其原代码。在这种使用方式下,会提供一个简单的C语言头文件将SafeRTOS的API函数映射于其在ROM中对应位置内。这种将SafeRTOS放在只读存储器的作法相当理想,因为其中的程序不会被修改,去除了用户的错误,也确保在项目开发过程中,SafeRTOS部分的程序都和认证时的相同。

OpenRTOS

[编辑]

OpenRTOS也是和FreeRTOS有关的项目,其代码和FreeRTOS完全相同,但是其许可及收费方式不同。OpenRTOS是由WITTENSTEIN Aerospace and Simulation Ltd提供的软件,其许可要求移除了所有参考GNU通用公共许可证的内容。OpenRTOS是商业软件,需购买后才能使用,也没有上述的许可要求,购买OpenRTOS的客户也可以获得完整的技术支持[14]

参见

[编辑]

参考资料

[编辑]
  1. ^ FreeRTOSv202212.01 Latest. 2023年3月4日 [2023年8月8日]. 
  2. ^ 202210.01-LTS (November 2022). 2022年11月18日 [2023年8月19日]. 
  3. ^ 2011 Embedded Market Study. EE Times. [2016-08-12]. (原始内容存档于2012-04-02). 
  4. ^ Kolesnki, Sergey. Comparing microcontroller real-time operating systems. 2013-12-08 [2016-08-12]. (原始内容存档于2016-08-20). A kernel is not an RTOS, but this can be a confusing issue because of the inappropriate naming chosen for some popular kernels, ‘freeRTOS’ for example. 
  5. ^ Why RTOS and What Is RTOS?. [29 August 2014]. (原始内容存档于2016-08-07). What is FreeRTOS? … The size constraints, and dedicated end application nature, rarely warrant the use of a full RTOS implementation - or indeed make the use of a full RTOS implementation possible. FreeRTOS therefore provides the core real time scheduling functionality, inter-task communication, timing and synchronisation primitives only. This means it is more accurately described as a real time kernel, or real time executive. … 
  6. ^ Official Website. [2016-08-12]. (原始内容存档于2016-08-15). 
  7. ^ FreeRTOS. [8 Aug 2012]. (原始内容存档于2016-08-15). 
  8. ^ SmartBotPaper (PDF). [8 Aug 2012]. (原始内容 (PDF)存档于2012-07-04). 
  9. ^ Relationship between FreeRTOS and SAFERTOS. [2016-08-12]. (原始内容存档于2016-08-19). 
  10. ^ EETimesSafetyCritical. [8 Aug 2012]. (原始内容存档于2011-04-30). 
  11. ^ Embedded Systems Design Europe. [2012-08-10]. (原始内容存档于2012-10-23). 
  12. ^ Texas Instruments (PDF). [2012-09-10]. (原始内容 (PDF)存档于2013-07-04). 
  13. ^ TI Stellaris Product range. [2016-12-30]. (原始内容存档于2013-01-04). 
  14. ^ OpenRTOS. [2016-08-12]. (原始内容存档于2014-10-28). 

外部链接

[编辑]
{{bottomLinkPreText}} {{bottomLinkText}}
FreeRTOS
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?