In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces "what is the structure of FreeRTOS real-time operating system" in detail, the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what is the structure of FreeRTOS real-time operating system" can help you solve your doubts.
FreeRTOS can be ported to many different architectures of processors and compilers. Each RTOS migration comes with a configured demo routine that makes it easy to start development quickly. Better yet, each demo routine comes with an instruction page that provides full information on how to locate the RTOS demo project source code, how to compile the demo routine, and how to configure the hardware platform.
1. Find related document pages
FreeRTOS has detailed development documentation, which can be viewed on its official website. First of all, open the official website, the current address is: http://www.freertos.org. In the navigation bar on the left side of the home page, expand the "Supported Devices & Demos" menu item and click the "OfficiallySupported Demos" link to view the list of microcontroller manufacturers supported by FreeRTOS. Click the microcontroller manufacturer name to enter the list of specific manufacturer documentation pages.
two。 Get the RTOS source code
Download the source code from the official FreeRTOS website. The download package contains the RTOS kernel source code and the official migration demonstration project. Unzip it and put it in the appropriate directory. (if you don't want to visit slow foreign websites, I have made a mirror image on CSDN, you can click here, this article has most of the latest FreeRTOS source package download links.)
Each RTOS migration package comes with a preconfigured demo routine that has created all the necessary RTOS source files and contains the necessary RTOS header files. It is recommended to program your own FreeRTOS application based on the demo routines provided.
3.FreeRTOS source directory structure
The FreeRTOS download package contains the source code for each processor porting and demonstration routine. Putting all the migration packages into one download file greatly simplifies the classification process, but the number of files in the download package is also astonishing! In any case, the directory structure is very simple, and the FreeRTOS real-time kernel has only three files (and some additional files, such as software timers, event groups, and co-routines, if needed).
The download package directory contains two subdirectories: FreeRTOS and FreeRTOS-Plus.
FreeRTOS-Plus contains FreeRTOS+ components and demonstration routines
FreeRTOS contains FreeRTOS real-time kernel source files and demonstration routines.
The FreeRTOS-Plus directory tree contains multiple README files (Readme). Next, this article only describes the core source files and demo routines of the FreeRTOS kernel, which are divided into two main subdirectories, as follows:
FreeRTOS
| | +-- Demo contains demonstration routine projects |
| +-Source contains real-time kernel source files.
The core of the RTOS code is contained in three files: tasks.c, queue.c, and list.c. These three files are located in the FreeRTOS/Source directory. There are also three optional files in this directory: timers.c, event_groups.c and croutine.c, which realize the functions of software timing, event group and co-program respectively.
The FreeRTOS/Source directory structure is as follows:
FreeRTOS
| | +-Source FreeRTOS kernel code file |
| | +-- include FreeRTOS kernel instead of wharf file |
| | +-- Portable processor specific code |
| | | +-- Compiler x supports all migration packages of compiler x |
| | | +-- Compiler y supports all migration packages of compiler y |
| | | +-- MemMang memory heap implementation example |
Each supported processor architecture requires a small piece of RTOS code related to the processor architecture. This is the RTOS migration layer, which is located in the FreeRTOS/Source/Portable/ [corresponding Compiler] / [corresponding CPU Schema] subdirectory.
For FreeRTOS, stack design also belongs to the migration layer. The heap_x.c file in the FreeRTOS/Source/portable/MemMang directory gives a variety of stack schemes, which will be described in more detail in future articles.
Examples of migration layer catalogs:
If you use a TriCore1782:TriCore specific file (port.c) under the GCC compiler, it is located in the FreeRTOS/Source/Portable/GCC/TriCore_1782 directory. All files under the FreeRTOS/Source/Portable subdirectory can be ignored or deleted except the FreeRTOS/Source/Portable/MemMang directory.
If you use a Renesas RX600:RX600 specific file (port.c) under the IAR compiler, it is located in the FreeRTOS/Source/Portable/IAR/RX600 directory. All files under the FreeRTOS/Source/Portable subdirectory can be ignored or deleted except the FreeRTOS/Source/Portable/MemMang directory.
The FreeRTOS download package also includes demonstration routines for various processor architectures and compilers. Most of the demo routine code is common to all portals and is located in the FreeRTOS/Demo/Common/Minimal directory. The code under the FreeRTOS/Demo/Common/Full directory is historical legacy code, which is used only for PC.
The FreeRTOS/Demo directory structure is as follows:
FreeRTOS
| | +-Demo |
| | +-Common demo routine file that can be used by all routines |
| | +-- Dir x demo routine project file for platform x |
| | +-Dir y demo routine project file for y platform |
The remaining subdirectories under the FreeRTOS/Demo directory contain preconfigured projects that can be used to build personal demonstration routines. The naming of subdirectories is related to the migration platform and compiler. Each RTOS migration package has its own documentation.
An example of the demo routine directory:
If you use Infineon TriBoard development board hardware to build TriCoreGCC demonstration routines: TriCore demo routine engineering files are located in the FreeRTOS/Demo/TriCore_TC1782_TriBoard_GCC directory. All subdirectories under the directory FreeRTOS/Demo (except the Common directory) can be ignored or deleted.
If you build the Renesas RX600 IAR demo routine with RX62N hardware: the IAR project file is located in the FreeRTOS/Demo/RX600_RX62N-RDK_IAR directory. All subdirectories under the directory FreeRTOS/Demo (except the Common directory) can be ignored or deleted.
After reading this, the article "what is the structure of the FreeRTOS real-time operating system" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it. If you want to know more about the article, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.