Creating a Makefile and Compiling Model Code

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 more information, refer to Adapting the C Template to Model Code and Real-Time Controllers and Real-Time Operating System Compatibility.
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) to compile the model source code.

    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.

    Note <RootDrive> is the drive where NI software installs and <xxxx> is the VeriStand version number.
  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.