Keil RTX5


Keil RTX5 is an open-source, deterministic real-time operating system implementing the CMSIS-RTOS v2 API, a generic RTOS interface for Cortex-M processor-based devices.

Modern microcontroller applications frequently have to serve several concurrent activities. RTX manages the switching between the activities. Each activity gets a separate thread which executes a specific task and to simplify the program structure. Keil RTX5 is scalable and additional threads can be added easily at a later time. Threads have a priority allowing faster execution of time-critical parts of a user application.

Keil RTX5 offers services needed in many real-time applications, such as threads, timers, memory and object management, message exchange and others.

Benefits

Open-source - Free-to-use commercial-grade RTOS.

Keil RTX5 (including source code) is shipped with Arm Keil MDK. This full-featured, commercial-grade RTOS is fully configurable and has no restrictions. It is shipped under the permissive Apache 2.0 license and is fully developed on GitHub.

 

Easy to use - Reduced learning curve, faster product development.

Keil RTX5 is provided as a CMSIS component and can be easily managed in a µVision Run-Time Environment dialog.

It provides a number of configuration parameters for the kernel operation as well as for the RTX objects such as threads, mutexes and semaphores. Configuration wizard annotations make parameter settings clear and intuitive.

 

Safe and secure - Reliable and secure operation.


Flexible scheduling
- Choose the best scheduling for your application.

Keil RTX5 offers various kernel scheduling options, allowing you to use the best suited one in your application.

  • Pre-emptive - each thread has a different priority and will run until a higher priority thread is ready to run. This is commonly used in interactive systems where a device may be in standby or background mode until some input is sent to it.
  • Round-robin - each thread will run for a fixed period of CPU run-time (time slice). Data loggers/system monitors typically employ round-robin scheduling, to sample all sensors or data-sources in turn with no prioritization.
  • Co-operative - each thread will run until it is told to pass control to another thread or reaches a blocking OS call. Co-operative multi-tasking can be seen in applications that require a fixed order of execution.


Deterministic behavior
- Known behavior for time critical tasks.

Keil RTX5 delivers fully deterministic behavior meaning that events and interrupts are handled within a predefined time (deadline). Your application can rely on consistent and known process timings.


Designed for embedded systems
- Uses the minimum amount of system memory.

Keil RTX5 is specifically written for applications running on Arm Cortex-M based MCUs. It runs quickly and requires only minimal MCU resources with a memory footprint as small as 5KB (ROM).


Source code
- Useful for certification.

Keil RTX5 is publicly developed on GitHub with full source code available.


Low-power mode
- has tick-less operation mode for low power devices.

 

Migration paths

Keil RTX5 is a new implementation that natively supports the CMSIS-RTOS v2 API. Using a compatibility layer provides CMSIS-RTOS v1 API compliance. You can even intermix both API layers in the same project.

Other operating systems supporting CMSIS-RTOS v2 API are:

FuSa RTX RTOS

The use of a real-time operating system (RTOS) in a safety-critical system demands that the RTOS component also undergoes rigorous verification. In cases when regulatory certification is mandatory this also implies specific documentation and testing processes for the targeted safety standards.

To enable and streamline the product safety certification, Arm provides FuSa RTX RTOS as part of our Functional Safety Run-Time System (FuSa RTS) package, that is qualified for use in automotive, industrial, railway and medical applications.

 

Strictly validated code

MISRA C rules - RTX is written in C using C99 language extensions with MISRA C:2012 guidelines being applied to it.

Safety compliance - FuSa RTX code has gone through stringent safety analysis and rigorous testing. It is approved for use in applications with the most demanding safety integrity levels (SIL). See FuSa RTS for the list of applicable safety standards.

 

Reliable execution

Time-deterministic interrupt execution - RTX utilizes the LDEX/STEX instruction available on most Cortex-M processors and therefore user interrupts are never disabled

 

Safe operation

Separate stacks for ISR/RTOS and threads - the RTOS kernel executes in handler mode with stack separated from user threads which avoids unexpected stack loads.

Stack overflow checking - RTX implements a software stack overflow checking that traps stack overruns.

Runtime check of kernel objects - object identifiers are validated at run-time for type-mismatches and are protected from inadvertently accesses by the user application.

 

Flexible memory management

Object-specific memory pools - dedicated fixed-size memory blocks for each object type avoids memory fragmentation during run-time and makes object creation and destruction time deterministic.

Static object memory allocation - the user application may rely on static memory for kernel objects, which guarantees that the RTOS system can never run out of storage during run-time.

 

RTOS-aware debugging

Event Recorder support - all important internal FuSa RTX events can be logged and analyzed using Event Components and System Analyzer.

Stack Usage Watermark - special provisions in FuSa RTS allow MDK debugger to determine during run-time the current and the maximum stack usage for each thread.

Object Memory Usage Counters - built-in mechanism that helps to analyze the maximum memory usage for each RTX object type.