FreeRTOS
Please contact us
DURATION 4 Days
Course Overview
This course serves as a detailed introduction to FreeRTOS operating system including hands-on lab exercises
Who should attend?
Embedded/real-time systems software developers.Prerequisite:
- Experience with developing embedded/real-time software
- Working knowledge of C programming language
Course Outline:
- RTOS Introduction and Concepts
- Real-time operating systems core principles
- Deterministic and predictability
- Priority-based scheduling, preemption
- Bare-metal vs. RTOS implementations
- Pros and cons of each approach
- When to choose RTOS over bare-metal implementation
- RTOS main building blocks
- Task management and scheduling
- Inter-task communication and synchronization mechanisms
- Time management and timer services
- Memory management in RTOS
- The Development Environment
- Toolchain & IDE, common output formats
- Flash organization, linker scripts
- Flash & RAM consumption, map file
- FreeRTOS Introduction
- Overview of FreeRTOS API organization
- Understanding naming conventions and function categories
- Documentation and resources available
- How FreeRTOS works
- FreeRTOS architecture and core components
- Kernel internals and scheduling algorithm
- Configuration options and customization possibilities
- Heap memory management
- FreeRTOS memory management schemes
- Comparing different heap implementations
- Best practices for dynamic memory allocation in real-time systems
- Timer tick
- System ticks in FreeRTOS
- Configuring tick rate and its impact on system performance
- What’s in a Task?
- Task structure and attributes in FreeRTOS
- Stack allocation and management for tasks
- Task control block (TCB) and its role in task management
- System tasks
- Task creation
- API functions for creating tasks in FreeRTOS
- Parameters involved in task creation
- Static and dynamic creation
- Task priority
- Understanding priority levels in FreeRTOS
- Implementing priority-based scheduling
- Avoiding priority inversion and using priority inheritance
- Task Life Cycle
- Understanding the different states a task can be in
- Transitions between task states and their triggers
- API functions for manipulating task states
- Round-Robin & Time-Slicing
- FreeRTOS scheduling policies
- Implementing round-robin scheduling for tasks of equal priority
- Time-slicing and its effects
- Tasks control API
- FreeRTOS task management functions
- Suspending, resuming, and deleting tasks
- Changing task priorities dynamically
- Delay functions
- Using vTaskDelay() and vTaskDelayUntil() for task timing
- Relative and absolute delays
- Periodic tasks
- Application Timers
- FreeRTOS software timers
- One-shot and periodic timers
- Timer callback functions and their execution context
- Interrupt handling with Tasks
- Integrating ISRs with FreeRTOS tasks
- Deferred interrupt processing
- API functions safe for use in interrupt context
- Message Queues
- FreeRTOS queue data structure
- Using queues for inter-task communication
- Blocking and non-blocking queue operations
- Counting vs. Binary Semaphores
- Differentiating between counting and binary semaphores
- Implementing synchronization and signaling using semaphores
- Mutex synchronization objects
- FreeRTOS mutual exclusion (mutex)
- Creating and using mutexes to protect shared resources
- Avoiding deadlocks and priority inversion
- Direct task communication
- FreeRTOS direct-to-task notifications
- Comparing task notifications with other communication methods
- Event Flag Groups
- FreeRTOS event groups
- Creating and manipulating event flags
- Synchronizing tasks using event groups
- Memory Buffers
- Stream buffers
- Message buffers
- Debugging Mechanisms
- Assertions
- Using the debugger
- Debugging considerations
- FreeRTOS Run-time statistics
- FreeRTOS Stack overflow detection
- FreeRTOS Tracing
- FreeRTOS & Low power
- Tickless idle mode
- Wakeup sources
- Best Practices & Considerations
- Tasks allocation
- SysTick optimization
- Critical sections
- Memory allocations
- ISR efficiency
- Waiting efficiency