1、获取freertos程序源码
从官方:https://www.freertos.org/index.html 下载
2、解压文件“freertosv10.1.1.exe”,了解目录结构
参考:https://www.freertos.org/a00017.html
FreeRTOS:对应FreeRTOS real time kernel source code(FreeRTOS的内核源码)
FreeRTOS-Plus:对应FreeRTOS real time kernel source code + additional FreeRTOS components and third party
complementary products(FreeRTOS的内核源码+内核以外的组件和第三方补充)
FreeRTOS
|+-Source The core FreeRTOS kernel files
|+-include The core FreeRTOS kernel header files
|+-Portable Processor specific code.
|+-Compiler x All the ports supported for compiler x
+-Compiler y All the ports supported for compiler y
+-MemMang The sample heap implementations
FreeRTOS
|+-Demo Contains the demo application projects.
|+-Source Contains the real time kernel source code.
The core RTOS code is contained in three files, which are called called tasks.c, queue.c and list.c. These three files are in the FreeRTOS/Source directory. The same directory contains two optional files called timers.c and croutine.c which implement software timer and co-routine functionality respectively.
核心的三个文件:tasks.c, queue.c and list.c
可选的两个文件是:timers.c and croutine.c,分别实现软件定时器和协同例程功能
Each supported processor architecture requires a small amount of architecture specific RTOS code. This is the RTOS portable layer, and it is located in the FreeRTOS/Source/Portable/[compiler]/[architecture] sub directories, where [compiler] and [architecture] are the compiler used to create the port, and the architecture on which the port runs, respectively.
处理器架构、编译器相关的是/Source/Portable/[compiler]/[architecture] 目录下的文件:port.c、portmacro.h
For the reasons stated on the memory management page, the sample heap allocation schemes are also located in the portable layer. The various sample heap_x.c files are located in the FreeRTOS/Source/portable/MemMang directory.
内存管理相关的在portable layer,/Source/portable/MemMang,例如:heap_1.c、heap_2.c、heap_3.c、heap_4.c、heap_5.c
FreeRTOS DEMO部分
The FreeRTOS download also contains a demo application for every processor architecture and compiler port. The majority of the demo application code is common to all ports and is contained in theFreeRTOS/Demo/Common/Minimal directory (the code located in the FreeRTOS/Demo/Common/Full directory is legacy, and only used by the PC port).
FreeRTOS包含了各种处理器架构的demo,demo的应用代码大部分对所有处理器都是通用的,在FreeRTOS/Demo/Common/Minimal
The remaining FreeRTOS/Demo sub directories contain pre-configured projects used to build individual demo applications. The directories are named to indicate the port to which they relate. Each RTOS port also has its own web page that details the directory in which the demo application for that port can be found.
FreeRTOS /Demo的子目录包含了项目的预配置信息
The structure of the FreeRTOS/Demo directory is shown below.
FreeRTOS
|+-Demo
|+-Common The demo application files that are used by all the demos.
+-Dir x The demo application build files for port x
+-Dir y The demo application build files for port y
FreeRTOS-Plus
FreeRTOS-Plus 目录结构如下
+ The FreeRTOS-Plus/Source
+ The FreeRTOS-Plus/Demo
FreeRTOS-Plus/Source包含了各种组件
CLI 命令行实现
IO
TCP
Trace 用于FreeRTOS的Tracealyzer是用于跟踪和可视化基于FreeRTOS的系统的复杂工具
UDP
Reliance-Edge 是一款小巧,便携,高度可靠的电源故障安全文件系统
WolfSSL Openssl的针对嵌入式应用的精简版