MDK Components  Version 6.6
MDK-Professional Middleware
 All Pages
Generic Steps

There are a few generic steps that have to be done to include a middleware component in a µVision project:

generic_steps.png
Generic steps for adding Middleware to a µVision project

Add Software Components

Using the Manage Run-Time Environment window, you need to select the required software components for your application. The Validation Output helps you to identify dependencies to other software components and resolves them automatically, whenever possible.

manage_rte_window.png
Manage Run-Time Environment Window with Validation Errors

Configure Middleware

Every middleware component has specific configuration files that need to be adapted to the needs of the application. Depending on the component, more than one file might need to be adapted. For example, the File System component needs to be configured for the amount of files that can be opened simultaneously and the initial current drive in the FS_Config.c file. In addition, you need to set drive specific settings in the FS_Config_Drive_0.h file, such as page and block sizes for Flash memories, general disk sizes for a RAM drive, and the hardware driver number for connecting the drive to the appropriate hardware peripheral driver.

file_system_conf.png
File System Configuration Files FS_Config_MC_0.h and FS_Config.c

Configure Drivers

Usually, the device driver related to a software component and the associated controller in the microcontroller need to be configured as well. For the Middleware, this is usually done in the file RTE_Device.h. Here, you can enable or disable the different hardware controllers and you can specify which device pins are used for the different features of a specific device peripheral.

rte_device_h.png
RTE_Device.h File for Driver Configuration

Configure System Resources

Every software component has resource requirements for stack, heap, and memory. Configuration files such as startup_device.s and RTX_Conf_CM.h need to be adapted to these requirements. Every middleware component has a section that explains the resource requirements and gives examples on how to calculate the resulting values for adaption of the configuration files. The section Stack, Heap and RTOS Configuration gives you more information about the background and the configuration files that need to be touched.

rtx_startup.png
RTX_Conf_CM.c and startup_device.s for System Resource Configuration

Implement Application Features

Finally, the actual application needs to be implemented. For better understanding of the middleware components, take a look at the existing Example projects. They can be used as a starting point for application development. The Reference sections of each middleware component help to understand the API functions for the related components. Various user code templates are available to help you implementing your application.