Do you believe that simply using an RTOS ensures real-time processing? Watch this lecture to confirm. We'll provide insights into tricky interrupts, priorities, mutual exclusion, and porting.
Overcoming system performance degradation caused by frequent mutual exclusion
How to make task prioritization decisive
Test if my task runs in real-time.
Porting Know-how
FreeRTOS summarized in one lecture! Check out everything from concepts to practical know-how.
Lecture Topics ð
What is RTOS?
Real-Time Operating System?
RTOS is an abbreviation for real-time operating system . So that you can get the work done within a limited time. It is an operating system that has been created.
RTOS is an operating system developed for real-time applications. It is used in embedded products in various fields including automotive, home appliances, medical, aerospace, defense, industrial control, and automation, as well as in environments where high performance and reliability are essential .
Even tasks requiring high levels (Hard-Realtime) can process results within a limited time through a real-time operating system.
What is FreeRTOS?
As it is applied to various fields, RTOS also has various types and license forms. FreeRTOS is the best real-time operating system (RTOS) for microcontrollers and small microprocessors. FreeRTOS source code is distributed free of charge, so you can download FreeRTOS and start developing.
FreeRTOS is typically flashed into memory as a single image compiled with all the components needed for an embedded application. Regardless of the microprocessor used, embedded application developers can use the same standardized interface to the FreeRTOS kernel and all FreeRTOS software libraries.
The FreeRTOS kernel is designed to be small, simple, and easy to use. A typical RTOS kernel binary image size is 4-9K bytes .
FreeRTOS compatible microcontroller boards are readily available for under $100 .
In general, FreeRTOS-based applications have the advantage of being much simpler than Linux-based systems.
Freeertos.org provides a series of detailed tutorials and guides on using the FreeRTOS kernel, including a quick start guide (click) . By supporting tickless interrupts, the microcontroller can remain in a DEEP SLEEP sleep state until an interrupt occurs or the RTOS kernel switches the task to a ready state.
Amazon has implemented a number of software libraries based on the FreeRTOS kernel that enable IoT devices to securely connect to its cloud . When Amazon FreeRTOS is deployed on IoT devices, they can securely connect to cloud services such as AWS IoT Core and be updated remotely using the OTA update feature.
You will learn: ð
It is a well-known fact that FreeRTOS has a free and source code-based kernel . So what's the real benefit of having access to the kernel's source?
The fact that the kernel I use provides source code means that users can look into its contents whenever they want. However, if our ultimate goal is to drive a car called RTOS well, wouldn't it be more helpful for me to spend more time and effort on things like following turn signals, complying with crosswalk safety obligations, observing the rearview mirrors, and not accelerating too quickly, rather than focusing on learning the structure or principles of internal combustion engine vehicles?
You can also analyze the kernel source code to improve the kernel performance, but I can't recommend it because every code modification comes with responsibility. Rather, I think it is valuable to find and fix problems in my application by using the kernel source code, or to gain a better understanding of how the kernel works.
From now on, we will summarize the essential information that we need to know to properly operate a car called FreeRTOS.
6 Hot Topics in RTOS â
How to implement hard real-time
How to operate interruptsreliably and efficiently
How to overcome system performance degradation due to frequent mutual exclusion
How to make sure your tasks are prioritized
Test if the task I created works in real time
Porting know-how
All of the above are the core topics of this lecture. Now, let's get into the details.
First, aren't you mistaken in thinking that real-time processing will be achieved automatically just by using an RTOS?
Even if you build a house with the same materials, a house built by a certain carpenter will be safe and not shaken by strong winds or water leaks, while a house built by another carpenter will drip from the ceiling even when it rains a little, and in the winter, it will not be well insulated and will result in high heating costs. What is the difference? Just because you use an RTOS does not automatically guarantee the real-time performance of the program or product you create. This applies not only to FreeRTOS, but to all RTOSes. This lecture will teach you what efforts are needed to guarantee or achieve hard real-time.
Second, aren't you assuming that this is a task that requires quick handling of interrupts?
We will look at examples of how our stereotypes can negatively impact the products or programs we create, and explore solutions to address them.
Third, if you see a critical section within the source code function you are writing, don't you immediately try to use a mutex?
Wait a minute. You know that Mutex causes system performance degradation, right? Let's find out how to compensate for it or find an alternative.
Fourth, aren't you assigning high priorities to important tasks?
Anyone who has ever tried to prioritize tasks knows that it can be difficult. I will talk about the pitfalls of giving high priority to important tasks and suggest alternatives.
Fifth, as important as implementing the program is verifying that the task works in real time as I intended.
If necessary, you may need a measuring instrument or equivalent equipment in addition to a debugger. Of course, you can develop and test without these equipment, but it will be easier to identify problems and prepare countermeasures. I will tell you how to check whether the task I created is running in hard real time.
Sixth, I can't expect that the programs I write will always run on the same hardware.
When the hardware performance of the product I made is upgraded, it naturally requires porting work. I will share my long-time experience and know-how so that I can port the kernel myself without the help of others.
RTOS lecture know-howwith over 13 years of experience ð¡
I created this course with your time as precious as my own.
After 13 years of teaching RTOS on-site, I decided to create online lectures to meet more learners. I will meet you as an online lecture that optimizes the content of 4 days of on-site lectures into 8 hours .
Recommended for these people! ð
First time with RTOS Beginner learning
For FreeRTOS based products For those who are thinking about optimization
Lightweight OS for the product Those who wish to apply
IoT (Internet of Things) developer
Besides that, it would be good for people like this to learn too!
ð For those who want to kill two birds with one stone: hard real-time and stability of the product ð For those who want to compare and review with the Linux operating system ð Anyone who wants to increase their understanding of the operating system ð For those who do not have time to attend offline classes
Please check your player knowledge!
You should know the C language as prerequisite knowledge for learning.
What's special about this course âš
Feature 1. The video is divided into 180 subchapters, making it easier to find later.
Feature 2. 2D animation was actively used to help with understanding.
Feature 3. All practical examples come with TO-DO . This is a lecture where students can directly participate in the practical exercises.
Feature 4. It helps you boldly discard unnecessary content and focus more on the core .
Feature 5. We put in every effort to ensure that you can learn through videos alone, without having to look at the developer manual.
Check out the tools we use ð§°
Compiler: STM32CubeIDE
Practice board: STmicro official board (Nucleo, Discovery)
Hands-on examples and tutorial files: freeRTOS_tutorials.zip (files are in Section 0. Getting Started with FreeRTOS)
The board used in the lecture is Nucleo-64 F103RB. However, the hands-on examples also support the following boards: DISCO_F429I, DISCO_F469I, NUCLEO_F401RE, NUCLEO_F767ZI, NUCLEO_L010RB (these files are in the last section).
If the STM32 board you want is not in the list above, you can watch the video '(Appendix) Follow the lecture with my nucleo board' and then modify the source code of the practice example file (freeRTOS_tutorials) to fit your desired board and use it in this lecture, or ask the instructor to modify the source code to fit your desired board (free of charge. Usually takes 1-2 days. Apply in the Q&A corner.)
Created a lecture Introducing the knowledge sharerâïž
Hong Young-gi (Gail School)
Main history
1995: VRTXsa RTOS (68K MCU-based set-top box)
1999: VXWorks RTOS (MPC860 MCU-based VoIP)
2003: NucleusPlus RTOS (ARM MP3)
2004: uC/OS-II RTOS(ARM MP3)
2008~: RTOS Kernel Analysis and Utilization Practical Field Lecture
2019~: FreeRTOS Programming Practical Field Lecture
etc
Development of a dynamic memory manager compatible with malloc/free based on uC/OS-II
Porting miniGUI based on uC/OS-II
Porting TCP/IP to ethernet (DM9000A) based on uC/OS-II
Q. Can someone who doesn't know the C language take this course?
This course is good for engineers as well as non-majors and those interested in RTOS embedded products. However, if you do not know the C language, you may have difficulty understanding the parts related to practical training in class.
Q. Can intermediate level students also take this course?
The course is designed to cover not only those who are new to RTOS but also intermediate users who are already using RTOS. With 15 years of experience teaching RTOS programming at Seoul National University, Samsung Electronics, LG Electronics, Hyundai Mobis, LS Industrial Systems, and the Agency for Defense Development, I have covered the difficult parts and important topics of RTOS programming in depth.
Q. Do you also cover the Internet of Things (IoT) as a class topic?
FreeRTOS is used in a variety of IoT devices, but this course focuses on one topic: the RTOS kernel.
Q. There are various types of STM32 boards for practice. Is any of them okay?
In the video, the class is currently conducted based on the STM32 Nucleo64 f103rb board.
If you want to practice on a different STM32 board, watch the video '(Appendix) Follow the lecture with my Nucleo board' and then modify the source code of the practice example file (freeRTOS_tutorials) to fit your desired board and use this lecture, or ask the instructor to modify the source code to fit your desired board (free of charge. Usually takes 1-2 days. Apply in the Q&A corner.)
Q. Is FreeRTOS any good?
That's a very good question. And a difficult one. I have 12 years of experience developing embedded systems, and my experience spans firmware, RTOS, and embedded Linux.
To the question of which OS is better, I have prepared the following official answer: (1) Free/Paid (2) Source code/Binary (3) Has many users (4) Development environment support These are the important factors to consider when choosing an RTOS.
FreeRTOS gets almost full marks for items 1, 2, and 3 above. I wouldn't say FreeRTOS is the best OS, but I would at least recommend it.
Q. I am using VxWorks. Will this course help me?
Although the course title is FreeRTOS Programming, this course is designed to focus on the essence (core) of RTOS. Also, as you can see from my resume, I have already used various RTOSs.
This lecture covers the common knowledge that you need to know, frequently used skills, and misunderstandings or prejudices that users tend to have, regardless of the RTOS you use. I believe you will find it helpful.
Please check before taking the class! (License)
Presentation materials used in the lecture are provided to students free of charge in PDF document format .
The accompanying documents are to be used only for personal use as supplementary materials to lecture videos within Inflearn. When copying part or all of the contents of the book (including reprinting on a website or printed media, or copying as an electronic file), permission from the copyright holder, Hong Young-ki, a knowledge sharer, is required in accordance with Article 42 of the Korean Copyright Act, regardless of whether or not the purpose is commercial, except for personal use as stipulated in Article 27 of the Korean Copyright Act.