Features Documentation Examples Repository Blog Contact

Examples

Here are some examples showing how the CMRX-based ecosystem works. There is a CMRX examples repository online which contains examples complete with hardware integration.

Examples in this section are commented guides that describe various aspects and technologies available in CMRX RTOS. You can use them as a guide to learn how CMRX works.

For a detailed step-by-step guide on how to create new CMRX-based project from scratch, follow our getting started guides:


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.

64kB of protected memory ought to be enough for everyone.