Skip to end of metadata
Go to start of metadata

The rtos_description.h file is a configuration file that indicates to the whole Micrium OS which components are present. It allows components of Micrium OS to know what other components are enabled or disabled in the system. For example, knowing if the file system is present would allow the HTTP server or the MSC USB class to know that they can use it.

The rtos_description.h file is also used to indicate which CPU architecture is used (via RTOS_CPU_SEL), which toolchain is used to build the project (via RTOS_TOOLCHAIN_SEL), and which interrupt controller is used (via RTOS_INT_CONTROLLER_SEL). Both the toolchain and the interrupt controller defines have special "automatic" values (RTOS_TOOLCHAIN_AUTO and RTOS_INT_CONTROLLER_AUTO, respectively), where the system will attempt to automatically detect which to use. In some cases this automatic detection does not work, so you must specify that information yourself. Please refer to the sections below to know which values can be specified for those three defines.

By default, the rtos_description.h file is located together with all other configuration files (xxxx_cfg.h). See also Appendix A - Component(s) Description to find out which #defines must be added to rtos_description.h for every component present in your project. Please note that the xxxx_AVAIL defines do not need to have a value, they simply should be #define'd.

If these #defines do not correctly reflect which components are present in your project, this could lead to problems, such as modules not being initialized correctly, features not being available, or compilation errors.

The Listing - rtos_description.h example file shows an rtos_description.h file for an OS-III kernel-only project on a Cortex-M4 MCU, such as Silicon Labs' Pearl Gecko series. Please note the use of both "automatic" values, which are automatically resolved by the system.

/*
*********************************************************************************************************
*                                             EXAMPLE CODE
*********************************************************************************************************
* Licensing:
*   The licensor of this EXAMPLE CODE is Silicon Laboratories Inc.
*
*   Silicon Laboratories Inc. grants you a personal, worldwide, royalty-free, fully paid-up license to
*   use, copy, modify and distribute the EXAMPLE CODE software, or portions thereof, in any of your
*   products.
*
*   Your use of this EXAMPLE CODE is at your own risk. This EXAMPLE CODE does not come with any
*   warranties, and the licensor disclaims all implied warranties concerning performance, accuracy,
*   non-infringement, merchantability and fitness for your application.
*
*   The EXAMPLE CODE is provided "AS IS" and does not come with any support.
*
*   You can find user manuals, API references, release notes and more at: https://doc.micrium.com
*
*   You can contact us at: https://www.micrium.com
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*
*                                           RTOS DESCRIPTION
*
*                                      CONFIGURATION TEMPLATE FILE
*
* File : rtos_description.h
*********************************************************************************************************
*/

/*
*********************************************************************************************************
*********************************************************************************************************
*                                               MODULE
*********************************************************************************************************
*********************************************************************************************************
*/

#ifndef  _RTOS_DESCRIPTION_H_
#define  _RTOS_DESCRIPTION_H_


/*
*********************************************************************************************************
*********************************************************************************************************
*                                             INCLUDE FILES
*********************************************************************************************************
*********************************************************************************************************
*/

#include  <rtos/common/include/rtos_opt_def.h>


/*
*********************************************************************************************************
*********************************************************************************************************
*                                       ENVIRONMENT DESCRIPTION
*********************************************************************************************************
*********************************************************************************************************
*/

#define  RTOS_CPU_SEL                                       RTOS_CPU_SEL_ARM_CORTEX_M4

#define  RTOS_TOOLCHAIN_SEL                                 RTOS_TOOLCHAIN_AUTO

#define  RTOS_INT_CONTROLLER_SEL                            RTOS_INT_CONTROLLER_AUTO


/*
*********************************************************************************************************
*********************************************************************************************************
*                                       RTOS MODULES DESCRIPTION
*********************************************************************************************************
*********************************************************************************************************
*/

#define  RTOS_MODULE_KERNEL_AVAIL
#define  RTOS_MODULE_COMMON_AVAIL


/*
*********************************************************************************************************
*********************************************************************************************************
*                                             MODULE END
*********************************************************************************************************
*********************************************************************************************************
*/

#endif
Listing - rtos_description.h example file

List of Possible Values

All of the possible values for the three selection defines are listed below. They can all be found in <rtos/common/include/rtos_opt_def.h>.

CPU Selection Define (RTOS_CPU_SEL)

  • RTOS_CPU_SEL_SILABS_GECKO_AUTO
  • RTOS_CPU_SEL_ARM_CORTEX_M0
  • RTOS_CPU_SEL_ARM_CORTEX_M0P
  • RTOS_CPU_SEL_ARM_CORTEX_M1
  • RTOS_CPU_SEL_ARM_CORTEX_M3
  • RTOS_CPU_SEL_ARM_CORTEX_M4
  • RTOS_CPU_SEL_ARM_CORTEX_M7
  • RTOS_CPU_SEL_EMUL_WIN32
  • RTOS_CPU_SEL_EMUL_POSIX

Toolchain Selection Define (RTOS_TOOLCHAIN_SEL)

  • RTOS_TOOLCHAIN_ARMCC
  • RTOS_TOOLCHAIN_GNU
  • RTOS_TOOLCHAIN_IAR
  • RTOS_TOOLCHAIN_WIN32
  • RTOS_TOOLCHAIN_AUTO

Interrupt Controller Selection Define (RTOS_INT_CONTROLLER_SEL)

  • RTOS_INT_CONTROLLER_NONE
  • RTOS_INT_CONTROLLER_ARMV7_M
  • RTOS_INT_CONTROLLER_AUTO
  • No labels