Hello World
This example demonstrates the simplest possible application written for CMRX RTOS. Applications are the basic building block of CMRX-based firmware.
Remote Procedure Call
This example shows how to use Remote Procedure Calls (RPCs) to enable secure inter-process communication. RPCs allow to cross isolation boundary without compromising security.
Simple Driver
This example shows how to build a driver that safely controls hardware peripherals while maintaining system security. Learn how to grant access for peripheral device memory to a process.
Interrupts
Drivers usually need to handle interrupt requests. In this example it is shown how interrupt service handlers are written and how they communicate with the rest of the application.
Queues
Queue is a standard feature offered by real-time operating systems. This document describes how queues are used in CMRX
Synchronization
Now that you understand applications, RPC communication, and drivers, let’s explore how to coordinate multiple threads working together. This example shows how to use CMRX’s notification system to synchronize threads safely and efficiently.
What You’ll Learn
- How to coordinate multiple threads within an application
- Using
wait_for_object() and notify_object() for synchronization
- Understanding priority-based notification ordering
- Implementing producer-consumer patterns
- Using timeouts to prevent deadlocks
- Building thread-safe data structures
Why Thread Synchronization is Needed
In embedded systems, you often have multiple threads that need to coordinate their work:
Timers
Timers are an essential function for when interacting with outer world. Your application may need to perform some periodic task or wait for external peripheral to become ready.