Opposite to earlier versions of Frameworks by Willert Software Tools, the latest Frameworks are build inside your IDE and no longer inside Rhapsody. As a result, you no longer can set properties in the Rhapsody model to specify various RTOS details. Instead, you must use the mechanisms offered by your RTOS manufactorer. Usually, this means adapting a configuration file which you also can keep in your IDE project.
For RTL-ARM by Keil, you must modify its RTX kernel by modifying the file RTX_Config.c Please note that there is no default configuration in the RTX Library: you must add the file RTX_Config.c to each µVision Project you create.
By no means this documentation can be regarded as the complete RTX kernel documentation: please refer to the Keil documentation. We focus on integration with Rhapsody generated C code and the RXF by Willert Software Tools:
OS_TASKCNT which defaults to 6.
You should set this constant to match the number of active classes + 3 in your Rhapsody model. If the Framework fails to create a new task, the error handler RiCErrorHandler_error() is called with the constant OXF_TASK_CREATE_FAILED.
OS_PRIVCNT. This is the number of tasks with user provided stacks - which is what the RTL-ARM extension uses.
You should set this constant to match the number of active classes in your Rhapsody model. If the Framework fails to create a new task, the error handler RiCErrorHandler_error() is called with the constant OXF_TASK_CREATE_FAILED.
OS_TICK which is default set to the value of 10 msec. Its value must match RIC_MS_PER_TICK in WSTRTOS.h
In fact there are two ways to alter the RTX configuration:
you can modify the file RTX_Config.c, which you can store in your Configuration Management system. The configuration is easily visible, but you'd need to save this file at a project level.
you can define the constants inside µVision via Project | Options where you find on the C/C++ Tab an entry field labelled Define. The actual configuration is less visible, but the advantage is that you do not need to store the file RTX_Config.c with your project which is especially important when upgrading the Keil toolchain. You just refer to this file in your project, and keep the settings in the µVision project files which you need to store in your Configuration Management anyway because you also specify the startup file, exact device and target, memory layout etc. in the project iteself.
The file WSTRTOS.h is used to specify details for the RTL-ARM which are needed by the RTOS bridge interface. You can modify the constants:
RTOS_PRIORITY_LOW. This priority is used for the Bridge task, when in simulated-time model.
RTOS_PRIORITY_NORMAL. This priority is used for any task, created on behalf of your active class(es).
RTOS_PRIORITY_ABOVE_NORMAL. This priority is defined a little higher than RTOS_PRIORITY_NORMAL and can be used for tasks that need to be higher prioritized. It is not assigned to any tasks of the RXF or the user model automatically.
RTOS_PRIORITY_HIGH. This priority is used for the Bridge task, when in real-time model.
RTOS_DEFAULT_STACK. This is the default stack size for any task, created on behalf of your active class(es).
RTOS_MQ_DEFAULT_SIZE . This is maximum number of queued events within your application.
RTOS_MAIN_STK_SIZE. This is the stack size for the Main task.
NOTE
If you modify a source file, you must rebuild your application, see GettingStarted example
Copyright (c) Willert Software Tools GmbH. All rights reserved.