SSZTCM6 june   2015

 

  1.   1
  2.   2
    1.     3

This blog is about the RTX, ARM's free and reliable RTOS. RTX now has a BSD license and this makes it free. ARM provides all RTX source code and maintains it. While initially focused on Cortex®-M processors, RTX has been ported to Cortex-R and at least one Cortex-A9. It runs perfectly on TI's new MSP432 MCU platform, based on the ARM Cortex-M4 core.

A tutorial with RTX and DSP examples for the MSP432 MCU LaunchPad is now available online.

RTX is a full-featured RTOS that consumes minimal resources on your target and is easy to install, configure and modify. You can use RTX with any tool chain: not just Keil MDK and this includes GCC. RTX is completely CMSIS-RTOS compliant. This makes it easy to use and stable.

It took me about 5 minutes to get RTX configured and running with a minimum main.c project on the MSP432 LaunchPad using the general steps outlined in the MDK Getting Started manual. It is available here: www.keil.com/mdk5/. General information about RTX is here: www.keil.com/rl-arm/kernel.asp

RTX uses a minimum of system resources and never turns off IRQ interrupts. RTX uses the Cortex SysTick timer with its Interrupt 15 and also has a tickless mode for low power operation. RTX uses less than 4 Kbytes for the kernel. Here are the memory requirements:

GUID-19F35EB4-D711-48E3-814F-F5C4A3F306AE-low.png

There are compelling advantages of using an RTOS in all but the simplest of designs. See http://www.keil.com/rl-arm/rtx_rtosadv.asp  for more details.

The best way to get the latest RTX is to download and install MDK. MDK is free and you do not need any license. You can then obtain the RTX libraries with source code here: C:\Keil_v5\ARM\Pack\ARM\CMSIS\4.3.0\CMSIS\RTOS. You can use the kernel awareness windows provided with µVision® to experiment with RTX and view how your changes affect its operation.

Another method is by downloading the ARM CMSIS Pack CMSIS (Cortex Microcontroller Software Interface Standard). This file has a .pack extension which is really a standard .zip file. The RTX files with source code are inside this zip file.

Ports are included for Keil, GCC and IAR toolchains.

This is the System and Thread Viewer displaying information real-time about threads: You do not need to stop the program to view this window.

GUID-363386AA-05D0-4B73-BA6E-B2D3FDC9A9C2-low.png

This is the Event Viewer and it also updates in real-time while your program is running: It displays in a graphical format when each thread is running with timestamps. Note the ide daemon is running most of the time. You can change these timing parameters easily and see the results immediately in the Event Viewer. You can measure timings with the cursors. Serial Wire Viewer (SWV) support is needed for the Event Viewer. This is supplied with a Keil ULINK®2, ULINKpro or a Segger J-Link.

GUID-19421AFB-B843-48AD-9F5A-C46D751F1A4B-low.png

I created a hands-on tutorial using Keil MDK with the MSP432 MCU and it includes references to RTX. There are several examples and two of them use RTX. Blinky is a small bare metal program and RTX_Blinky has RTX added to it. The DSP example uses RTX to allocate processing time between four threads. There is a section on adding RTX to a project and then adding a thread. This action shows up in the kernel awareness windows. This lab is located here: www.keil.com/appnotes/docs/apnt_276.asp