Difference between revisions of "FreeRTOS"
(14 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
<!-- /**************************************** Page Description Text ****************************************/ --> | <!-- /**************************************** Page Description Text ****************************************/ --> | ||
<!-- /*********************************************************************************************************/ --> | <!-- /*********************************************************************************************************/ --> | ||
+ | ===Intro=== | ||
FreeRTOS is a lightweight RTOS design for embedded systems. Distributed freely under the MIT open source license, FreeRTOS includes a kernel and a growing set of libraries suitable for use across all industry sectors. FreeRTOS is built with an emphasis on reliability and ease of use. It allows the creation of multiple 'tasks' (multi-threading) | FreeRTOS is a lightweight RTOS design for embedded systems. Distributed freely under the MIT open source license, FreeRTOS includes a kernel and a growing set of libraries suitable for use across all industry sectors. FreeRTOS is built with an emphasis on reliability and ease of use. It allows the creation of multiple 'tasks' (multi-threading) | ||
and provides essential kernel elements for the snychronization between these tasks(Things like Mutexes, Semaphores, queues, etc.) It also enables the implementation of more advanced features like Software timers, and tickless idle for power-saving purposes. | and provides essential kernel elements for the snychronization between these tasks(Things like Mutexes, Semaphores, queues, etc.) It also enables the implementation of more advanced features like Software timers, and tickless idle for power-saving purposes. | ||
Line 13: | Line 14: | ||
With a focus on compactness and speed of execution, FreeRTOS gives the user precision control over RTOS elements and forgoes the 'fluff' present in a full-blown OS. This allows users to scale their RTOS implementation to the needs of their project. | With a focus on compactness and speed of execution, FreeRTOS gives the user precision control over RTOS elements and forgoes the 'fluff' present in a full-blown OS. This allows users to scale their RTOS implementation to the needs of their project. | ||
+ | ==From FreeRTOS's webpage: [https://www.freertos.org/about-RTOS.html What is an RTOS?]== | ||
+ | |||
+ | ===''What is a General Purpose Operating System?''=== | ||
+ | ''An operating system is a computer program that supports a computer’s basic functions, and provides services to other programs (or applications) that run on the computer. The applications provide the functionality that the user of the computer wants or needs. The services provided by the operating system make writing the applications faster, simpler, and more maintainable. If you are reading this web page, then you are using a web browser (the application program that provides the functionality you are interested in), which will itself be running in an environment provided by an operating system.'' | ||
+ | |||
+ | ===''What is an RTOS?''=== | ||
+ | ''Most operating systems appear to allow multiple programs to execute at the same time. This is called multi-tasking. In reality, each processor core can only be running a single thread of execution at any given point in time. A part of the operating system called the scheduler is responsible for deciding which program to run when, and provides the illusion of simultaneous execution by rapidly switching between each program. | ||
+ | The type of an operating system is defined by how the scheduler decides which program to run when. For example, the scheduler used in a multi user operating system (such as Unix) will ensure each user gets a fair amount of the processing time. As another example, the scheduler in a desk top operating system (such as Windows) will try and ensure the computer remains responsive to its user. [Note: FreeRTOS is not a big operating system, nor is it designed to run on a desktop computer class processor, I use these examples purely because they are systems readers will be familiar with]'' | ||
+ | |||
+ | ''The scheduler in a Real Time Operating System (RTOS) is designed to provide a predictable (normally described as deterministic) execution pattern. This is particularly of interest to embedded systems as embedded systems often have real time requirements. A real time requirements is one that specifies that the embedded system must respond to a certain event within a strictly defined time (the deadline). A guarantee to meet real time requirements can only be made if the behaviour of the operating system’s scheduler can be predicted (and is therefore deterministic).'' | ||
+ | |||
+ | ''Traditional real time schedulers, such as the scheduler used in FreeRTOS, achieve determinism by allowing the user to assign a priority to each thread of execution. The scheduler then uses the priority to know which thread of execution to run next. In FreeRTOS, a thread of execution is called a task.'' | ||
+ | |||
+ | |||
+ | ===''What is FreeRTOS?''=== | ||
+ | ''FreeRTOS is a class of RTOS that is designed to be small enough to run on a microcontroller – although its use is not limited to microcontroller applications.'' | ||
+ | |||
+ | ''A microcontroller is a small and resource constrained processor that incorporates, on a single chip, the processor itself, read only memory (ROM or Flash) to hold the program to be executed, and the random access memory (RAM) needed by the programs it executes. Typically the program is executed directly from the read only memory.'' | ||
+ | |||
+ | ''Microcontrollers are used in deeply embedded applications (those applications where you never actually see the processors themselves, or the software they are running) that normally have a very specific and dedicated job to do. 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. Additional functionality, such as a command console interface, or networking stacks, can then be included with add-on components.'' | ||
+ | |||
+ | ===What Next?=== | ||
+ | For those unfamiliar with RTOS concepts we recommend checking out the FreeRTOS webpage [https://www.freertos.org/about-RTOS.html HERE]. FreeRTOS is extremely well documented and hence relatively easy to use. PDF documentation is provided [[CutiPy FreeRTOS Documentation | HERE]]. Of the most benefit is the [https://www.freertos.org/wp-content/uploads/2018/07/161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf Mastering the FreeRTOS Real Time Kernel] reference document. FreeRTOS FAQs are addressed [https://www.freertos.org/FAQWhat.html#Kernel HERE] | ||
+ | |||
+ | ===EMAC and FreeRTOS=== | ||
+ | EMAC's software builds come with FreeRTOS already imported, letting the user jump-in and start using FreeRTOS functionality immediately. | ||
Line 19: | Line 46: | ||
− | [[ Getting | + | [[ Getting Started with CutiPy and FreeRTOS | Getting Started with CutiPy and FreeRTOS ]] |
[[CutiPy FreeRTOS Documentation | CutiPy FreeRTOS Documentation]] | [[CutiPy FreeRTOS Documentation | CutiPy FreeRTOS Documentation]] | ||
+ | |||
+ | |||
+ | [[ Getting Started with MitiPy and FreeRTOS | Getting Started with MitiPy and FreeRTOS ]] | ||
+ | |||
+ | [[MitiPy FreeRTOS Documentation | MitiPy FreeRTOS Documentation]] | ||
+ | |||
[[STM32CubeIDE | STM32CubeIDE]] | [[STM32CubeIDE | STM32CubeIDE]] |
Latest revision as of 13:35, 2 September 2020
Contents
Intro
FreeRTOS is a lightweight RTOS design for embedded systems. Distributed freely under the MIT open source license, FreeRTOS includes a kernel and a growing set of libraries suitable for use across all industry sectors. FreeRTOS is built with an emphasis on reliability and ease of use. It allows the creation of multiple 'tasks' (multi-threading) and provides essential kernel elements for the snychronization between these tasks(Things like Mutexes, Semaphores, queues, etc.) It also enables the implementation of more advanced features like Software timers, and tickless idle for power-saving purposes.
With a focus on compactness and speed of execution, FreeRTOS gives the user precision control over RTOS elements and forgoes the 'fluff' present in a full-blown OS. This allows users to scale their RTOS implementation to the needs of their project.
From FreeRTOS's webpage: What is an RTOS?
What is a General Purpose Operating System?
An operating system is a computer program that supports a computer’s basic functions, and provides services to other programs (or applications) that run on the computer. The applications provide the functionality that the user of the computer wants or needs. The services provided by the operating system make writing the applications faster, simpler, and more maintainable. If you are reading this web page, then you are using a web browser (the application program that provides the functionality you are interested in), which will itself be running in an environment provided by an operating system.
What is an RTOS?
Most operating systems appear to allow multiple programs to execute at the same time. This is called multi-tasking. In reality, each processor core can only be running a single thread of execution at any given point in time. A part of the operating system called the scheduler is responsible for deciding which program to run when, and provides the illusion of simultaneous execution by rapidly switching between each program. The type of an operating system is defined by how the scheduler decides which program to run when. For example, the scheduler used in a multi user operating system (such as Unix) will ensure each user gets a fair amount of the processing time. As another example, the scheduler in a desk top operating system (such as Windows) will try and ensure the computer remains responsive to its user. [Note: FreeRTOS is not a big operating system, nor is it designed to run on a desktop computer class processor, I use these examples purely because they are systems readers will be familiar with]
The scheduler in a Real Time Operating System (RTOS) is designed to provide a predictable (normally described as deterministic) execution pattern. This is particularly of interest to embedded systems as embedded systems often have real time requirements. A real time requirements is one that specifies that the embedded system must respond to a certain event within a strictly defined time (the deadline). A guarantee to meet real time requirements can only be made if the behaviour of the operating system’s scheduler can be predicted (and is therefore deterministic).
Traditional real time schedulers, such as the scheduler used in FreeRTOS, achieve determinism by allowing the user to assign a priority to each thread of execution. The scheduler then uses the priority to know which thread of execution to run next. In FreeRTOS, a thread of execution is called a task.
What is FreeRTOS?
FreeRTOS is a class of RTOS that is designed to be small enough to run on a microcontroller – although its use is not limited to microcontroller applications.
A microcontroller is a small and resource constrained processor that incorporates, on a single chip, the processor itself, read only memory (ROM or Flash) to hold the program to be executed, and the random access memory (RAM) needed by the programs it executes. Typically the program is executed directly from the read only memory.
Microcontrollers are used in deeply embedded applications (those applications where you never actually see the processors themselves, or the software they are running) that normally have a very specific and dedicated job to do. 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. Additional functionality, such as a command console interface, or networking stacks, can then be included with add-on components.
What Next?
For those unfamiliar with RTOS concepts we recommend checking out the FreeRTOS webpage HERE. FreeRTOS is extremely well documented and hence relatively easy to use. PDF documentation is provided HERE. Of the most benefit is the Mastering the FreeRTOS Real Time Kernel reference document. FreeRTOS FAQs are addressed HERE
EMAC and FreeRTOS
EMAC's software builds come with FreeRTOS already imported, letting the user jump-in and start using FreeRTOS functionality immediately.
Pages with Related Content
Getting Started with CutiPy and FreeRTOS