Table Of Contents

Creating a Makefile and Compiling Model Code

Last Modified: June 10, 2021

Create a makefile for the compiler and operating system your model will use.

Before you begin, adapt the C template to your model code and determine which real-time (RT) operating system your RT target runs. For your model code to work with the VeriStand Model Framework, create an appropriate makefile to compile your model code.
  1. Create a makefile (.mak) that generates a dynamic link library (.dll) for Windows and NI ETS targets.

    For examples of makefiles designed to compile models that work with the VeriStand Model Framework, refer to the example .mak and .mk files installed in the <RootDrive>\VeriStand\<xxxx>\ModelInterface\custom\examples directory.

    spd-note-note
    Note  

    <RootDrive> is the drive where NI software installs and <xxxx> is the VeriStand version number. For more information on compiling a .dll for ETS target, refer to Verify Your DLL Is Executable in LabVIEW Real-Time on NI PharLap ETS.

  2. Place your model code components in the same directory as the makefile.
  3. Place your model framework components, ni_modelframework.h and ni_modelframework.c, in the same directory as the makefile.
  4. Run the makefile to compile your model code.

Recently Viewed Topics