MATLAB: How to compile the C-code generated from the Real-Time Workshop in MS Developer Studio

ccodecompiledevelopermicrosoftmsrealrtwsimulink coderstudiotimevisualworkshop

How do I compile the C-code generated from the Real-Time Workshop in MS Developer Studio?

Best Answer

In order to compile the C-code generated from the Real-Time Workshop in MS Developer Studio, please use the following instructions:
1) Change the template makefile for the build from 'grt_default_tmf' to 'grt_msvc.tmf'. To do so, choose Configuration parameters from the Simulation menu. Then, Click on the Real-Time Workshop tab and change the template makefile defined there within.
This will create a model.mak file that is suited for the MS Developer Studio.
2) Bring up the MS Developer and load the workspace. Since the .mak file is originally for MSVC 4.2, when you load the workspace, you may receive a couple of warning messages. Just click "OK" to these messages.
3) Go to 'Set Active Configuration' within the 'Build' tab and select debug.
4) Build the executable file.