Why am I receiving an error when I try to use MAKE_RTW in Real-Time Workshop with compiler options specified?

7 views (last 30 days)
Why am I receiving an error when I try to use MAKE_RTW in Real-Time Workshop with compiler options specified?
I have specified -DREAL_T=float as a compiler option as described in the documentation.
I receive one of the following errors:
NMAKE : fatal error U1065: invalid option '_'
Stop.
??? Error using ==> make_rtw
Error using ==> rtw_c
Error(s) encountered while building model "mymodel"
make_rtw -DREAL_T=float
make_rtw -D REAL_T=float
T:\1432753\myf14_grt_rtw>"D:\MATLAB6p5p1\rtw\bin\win32\gmake" -f mymodel.mk -DREAL_T=float ADD_MDL_NAME_TO_GLOBALS=1
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- D
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- R
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- E
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- A
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- L
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- _
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- T
D:\MATLAB6p5p1\rtw\bin\win32\gmake: illegal option -- =
??? Error using ==> make_rtw
Error using ==> rtw_c
Error(s) encountered while building model "mymodel"

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This has been verified as an error within the documentation for Real-Time Workshop within the Compiler Options section.
Redefining doubles as floats with the "-DREAL_T=float" option is not reliable.
Under Compiler Options on page 9-45 of the Real-Time Workshop Users Guide for Version 5, the following tip is given:
If you do not require double precision for your application, define real_T as float in your template
make file, or you can simply specify -DREAL_T=float after make_rtw in the Make command field.
This documentation is not correct. Various circumstances (such as the presence of literal constants) can cause this strategy to fail to remove all doubles from the generated code.
The only reliable way to be sure that doubles are absent is to formally propagate single-precision signals in the Simulink model.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!