2864 views|1 replies

530

Posts

4

Resources
The OP
 

【RT-Thread Reading Notes】2. RT-Thread Study Chapters 1-3 Reading Notes [Copy link]

  This post was last edited by a media student on 2019-4-21 22:53
【RT-Thread Reading Notes】2. RT-Thread Study Chapter 1-3 Reading Notes
Abstract This sharing is the study notes of Chapters 1-3 of "RT-thread Kernel Implementation and Application Development Practical Guide". Chapter 1 Preface The style of the preface fully reflects the style of Wildfire, with real language, soft knowledge and hard knowledge coexisting. According to Huoge's description: This book is divided into two parts. The first part focuses on how to build the RT-Thread kernel from scratch, and then guides us to learn how to use RT-Thread based on stm32. The learning experience is to combine theory with practice. Then, on the basis of learning RT-thread, you can integrate and master other RTOS. Of course, if we already know other RTOS, such as freertos, then learning RT-Thread is not difficult. Here is a point. Huoge specifically pointed out three reference materials when writing the book: the first is RT-Thread source code; the second is RT-Thread_manual_zh.pdf; the third is "STM32 Library Development Practical Guide". To learn this RTOS well, the first two are materials that must be familiar, and the third is the material that must be referenced for transplanting on stm32. Although Huo Ge pointed out that those who are not interested in the first part of the book (kernel explanation) can jump directly to the second part to learn. However, the author believes that this approach is not worth the loss, because if you don’t know the inner strength, how can you apply it freely? In the end, you are just copying and learning the fur. It is recommended that you study the first part carefully, study the code, and learn the skills and methods of code writing. If you are not too familiar with the advanced usage of C, memory allocation, structures, linked lists, pointers, and arm instructions, it is recommended that you buy a book "C and C Pointers" to study together, which will have a good effect. You will find that many kernel codes can be understood and used in your future code writing. Later, when you study the source code of Linux, you will find that there are many similarities in it. In addition, if there are students here who are learning data structures or C language, I suggest you download the source code of RT-Thread (downloadable from the official website) and the Linux source code, and you will understand why you need to learn C pointers, data structures and other knowledge. You will find how important linked lists are for task construction and pointers are for improving code efficiency. Many of the materials of Wildfire are open source. This book seems to have an electronic version, but I still like to read paper books. It may be that I mostly used books to acquire knowledge during my student days. Therefore, whenever I want to learn a new knowledge in depth, I will be more focused when studying with paper books. Chapter 2 How to Learn RTOS Brother Huo mainly explains what RTOS is, the difference and application scenarios between bare metal programming and RTOS programming, as well as how to learn RTOS and how to choose RTOS. RTOS, the full name of real time operation system, is a real-time operating system. As the name suggests, it is a real-time system. If the project requirements are relatively small and are all executed sequentially, bare metal programming is also an efficient code method. If the project is relatively large, or relatively complex, requires continuous iteration and updating, and has more functions, it may be more advantageous to use RTOS. To use RTOS in this way is actually transplantation. You need to understand the source code and transplant it in combination with the micro-processor you are using. Here I suggest that you use Git to manage the source code. Git can be managed locally or remotely connected to github. The source code of RT-Thread seems to be hosted on github. There are many interesting source codes on github, including AI tensorflow, DOS source code, etc. If you find a bug in RT-Thread in the future, or have any good ideas, you can implement it with code and upload it to github. Mr. Xiong may adopt your suggestion, and then you will become a contributor to the RT-Thread source code. The key to choosing a RTOS is to look at your needs. Different RTOS have different positioning or strengths, but for now, the two open source RTOS I know are freeRTOS and RT-Thread. These two RTOS are open source, which means you can get their source code for free and apply it for commercial purposes (it seems that you have to inform them, of course, some versions may be charged). RT-Thread is a domestic open source RTOS, which is worth learning. The information is relatively complete. The supporting development board of Wildfire can well assist our learning and deepen our understanding. Chapter 3 Introduction to RT-Thread It started in January 2006, with millions of developers and more than 20 million installed. Brother Huo explains hereRT-ThreadThe meaning of open source:You can use the kernel code for free, but when you modify the kernel code, you must open source your part of the modification, while the application part can be closed. The existence of RT-Thread is the pride of the Chinese people, representing that Chinese people can also initiate and maintain an open source RTOS. With the rise of the Internet of Things, I believe that RT-Thread will play an important role in more and more fields, helping more and more Chinese engineers, students and enterprises to go further. Finally, here are three pictures from the RT-Thread official website to illustrate the specific content and advantages of RT-Thread: This content was originally created by EEWORLD forum netizen Media Student. If you need to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source.

Latest reply

  Details Published on 2019-4-23 07:04

赞赏

2

查看全部赞赏

 

35

Posts

0

Resources
2
 
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list