Using the eRTOS RTDLL Template

eRTOS provides two templates in the Templates/Visual C++ branch in the supported versions of Microsoft Visual Studio:

The eRTOS project contains two build configurations: eRTOSDebug and eRTOSRelease. The eRTOS RTDLL Template sets the project settings for each configuration according to the program and project options that you specify. The template can also provide a basic C/C++ program framework with which to work. This program framework can include eRTOS program elements, which contain C/C++ code to create eRTOS objects and demonstrate their use.

Note: eRTOS only supports absolute pathnames.

Note: DLL projects built with the eRTOS RTDLL Visual Studio template will not build if the file name begins with a numeral.

Sections in this Topic:

Creating an eRTOS RTDLL

The eRTOS RTDLL template provides the structure for creating eRTOS RTDLLs.

To create an eRTOS RTDLL project:

  1. Create a new project in Visual Studio.
  2. Select C or C++ as the template type.
  3. Select the eRTOS RTDLL template. This template is a single-page dialog that displays the default project settings and provides optional application and program settings.
  4. To accept the current settings, click Finish. Optionally, you can specify other options and libraries that you want to include in your eRTOS application project:
  1. If these are all the options needed, click Finish to create the project. Otherwise, continue editing program settings for this application.

When Provide a program framework is checked, you can optionally add elements to the program framework. These code segments show proper usage of Real-time API function calls and can serve as examples of how to set up these elements.  Areas in the element code that need to be customized by the user are indicated by "TO DO" comments. You can select more than one type of programming element for a single project. The following table provides the available program elements.

Note: When Provide a program framework is un-checked, these options are grayed out.

    Element Description

    Periodic timer thread

    Transforms the basic Export function already in the program framework into Timer Thread Export.

  1. Click Finish. This generates the eRTOS solution and project according to the options you selected.

eRTOS Custom Macro

eRTOS utilizes a custom macro, $(eRTOSPlatform), that is used to find the correct library directory for projects. This custom macro requires two property files, which are installed with the eRTOS SDK:

All projects import these property files. If they are edited in any way, projects will not load correctly.

Resulting Configurations

Four configurations for creating DLLs are generated in Visual Studio when you create a project using the eRTOS RTDLL template:

x64

Related topics: