Who is this for?

This is an introductory topic for software developers new to RTOS development.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Implement a basic RTOS-based application

Prerequisites

Before starting, you will need the following:

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll create a minimal RTX5 application with the CMSIS-RTOS2 API in Keil μVision. First, you’ll install the latest CMSIS packs, configure a new project, and implement a main() that initializes the system tick and starts the kernel. Then, you’ll create an app_main control thread that creates additional worker threads to demonstrate basic multitasking. After building, you’ll run on a Fixed Virtual Platform from Keil MDK, inspect scheduler state and thread activity using the RTX RTOS view, and check formatted output in the Serial Windows > Debug (printf) window. Finally, you’ll configure CMSIS-View Event Recorder to capture runtime events and redirect STDOUT when semihosting isn’t available.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
How do I check that the required CMSIS packs are installed before creating the project?
Open the Pack Installer from Keil MDK and install the latest CMSIS packs. Update to the most recent versions before proceeding.
What should main() do to start RTX5, and how do I confirm the kernel is running?
main() sets up the SysTick using SystemCoreClockUpdate(), initializes the RTOS, and starts the kernel. In debug, open View > Watch Windows > RTX RTOS to see the kernel state and active threads.
How many threads does the example create and where are they started?
The example starts three threads from app_main using osThreadNew(). The number and names are arbitrary and serve to illustrate basic thread creation.
What steps build and run the project in Keil MDK, and what should I monitor during execution?
Save all files, click Build (F7), then Debug (Ctrl+F5) to launch the FVP. Open the RTX RTOS view and the Serial Windows > Debug (printf) window, click Run (F5), and observe thread activity and output before stopping.
When should I use Event Recorder and how do I route STDOUT to it?
Use Event Recorder when semihosting isn’t supported in Keil MDK. Enable CMSIS-View > Event Recorder (DAP variant), set CMSIS-Compiler > STDOUT (API) to Event Recorder, and enable CMSIS-Compiler > Core. In Arm Development Studio, Event Recorder and Component Viewer aren’t supported.
Next