arduino simulink build error
4 views (last 30 days)
Show older comments
I have arduino-0022 installed. I use matlab 2009b,
I DO NOT HAVE MY ARDUINO PLUGGED IN. I dont have it with me today. I have in the past, and I got his same error. I have never gotten past this error.
I still expected it to build a file. perhaps I am wrong about that.
Thanks, Dan
I have followed the instruction, (except for the com port today) as found in: SIMULINK SUPPORT PACKAGE FOR ARDUINO (also known as Arduino Target) =================================================================== Version 1.2 (R2011b), November 2011
when I try to build the example model blink I get this error:
The call to arduino_make_rtw_hook, during the before_make hook generated the following error: Undefined variable "Simulink" or class "Simulink.fileGenControl".
The build process will terminate as a result
I have pasted the full command window below
*************************************************************** * CATERPILLAR, INC MATLAB DEVELOPMENT TOOLS * *************************************************************** CATutils_MatLab Label: CATUTILS_MATLAB_2.3.1_BETA CATutils_MatLab SrcDir: C:\CATUTILS\CATutils_MatLab
The following toolboxes are installed: AutoCode:6.7.3 CANape:3.2 CATDFParser:1.7 Fast:0.1 ModelAdvisor:0.7 ModelExplorer:0.5 Model_Difference:0.15 Palette:3.12 ParImport:0.5.1 PatchManager:0.19.1 SignalAnalyzer:0.7 SignalBuilderHarnessGen:1.2 SimulinkAlignmentTool:1.1 StateflowPatternWizard:2.3 SystemArchitectIntegration:0.23.1 a2l_parser:0.20 cat_sl_customization:0.02 clearcase:1.12 fpga:0.12 makefile_build:2.14.1 mpl_pip6:1.5 rpac:3.0.8.1 ### Starting Arduino build procedure for model: demo_arduino_blink ### ### Arduino environment settings: ### ### ARDUINO_ROOT: c:\ard22 ### MCU: atmega328p ### F_CPU: 16000000 ### ### Generating code into build directory: C:\Users\sergidp\Documents\MATLAB\demo_arduino_blink_arduino ### Invoking Target Language Compiler on demo_arduino_blink.rtw tlc -r C:\Users\sergidp\Documents\MATLAB\demo_arduino_blink_arduino\demo_arduino_blink.rtw c:\arduinotarget\arduino\arduino.tlc -OC:\Users\sergidp\Documents\MATLAB\demo_arduino_blink_arduino -Ic:\arduinotarget\arduino -Ic:\arduinotarget\blocks -IC:\Users\sergidp\Documents\MATLAB\demo_arduino_blink_arduino\tlc -IC:\Program Files (x86)\MATLAB\R2009b\rtw\c\tlc\mw -IC:\Program Files (x86)\MATLAB\R2009b\rtw\c\tlc\lib -IC:\Program Files (x86)\MATLAB\R2009b\rtw\c\tlc\blocks -IC:\Program Files (x86)\MATLAB\R2009b\rtw\c\tlc\fixpt -IC:\Program Files (x86)\MATLAB\R2009b\stateflow\c\tlc -aEnforceIntegerDowncast=1 -aFoldNonRolledExpr=1 -aInlineInvariantSignals=0 -aInlineParameters=0 -aLocalBlockOutputs=1 -aRollThreshold=5 -aZeroInternalMemoryAtStartup=1 -aZeroExternalMemoryAtStartup=1 -aInitFltsAndDblsToZero=0 -aForceBlockIOInitOptimize=0 -aGenerateReport=0 -aGenCodeOnly=0 -aRTWVerbose=1 -aIncludeHyperlinkInReport=0 -aLaunchReport=0 -aGenerateTraceInfo=0 -aForceParamTrailComments=0 -aGenerateComments=1 -aIgnoreCustomStorageClasses=0 -aIncHierarchyInIds=0 -aMaxRTWIdLen=31 -aShowEliminatedStatements=0 -aIncDataTypeInIds=0 -aInsertBlockDesc=0 -aIgnoreTestpoints=0 -aSimulinkBlockComments=1 -aInlinedPrmAccess="Literals" -aTargetFcnLib="ansi_tfl_table_tmw.mat" -aGenFloatMathFcnCalls="ANSI_C" -aIsPILTarget=0 -aIncludeMdlTerminateFcn=1 -aCombineOutputUpdateFcns=1 -aSuppressErrorStatus=0 -aERTCustomFileBanners=1 -aLogVarNameModifier="rt_" -aGenerateFullHeader=1 -aGenerateSampleERTMain=1 -aMatFileLogging=0 -aMultiInstanceERTCode=0 -aPurelyIntegerCode=0 -aPortableWordSizes=0 -aGenerateErtSFunction=0 -aGenerateASAP2=0 -aExtMode=0 -aExtModeStaticAlloc=0 -aExtModeStaticAllocSize=1000000 -aExtModeTransport=0 -aExtModeTesting=0 -aInlinedParameterPlacement="NonHierarchical" -aTargetOS="BareBoardExample" -aMultiInstanceErrorCode="Error" -aRateGroupingCode=1 -aRTWCAPISignals=0 -aRTWCAPIParams=0 -aRootIOStructures=0 -aERTCustomFileTemplate="arduino_file_process.tlc" -aGenerateTraceInfo=0 -aIgnoreTestpoints=0 -aProtectedModelReferenceTarget=0 -p10000
### Loading TLC function libraries
..... ### Initial pass through model to cache user defined code . ### Caching model source code ................ ### Writing header file demo_arduino_blink_types.h . ### Writing header file demo_arduino_blink.h ### Writing source file demo_arduino_blink.c ### Writing header file demo_arduino_blink_private.h . ### Writing source file demo_arduino_blink_data.c ### Writing source file ert_main.c ### TLC code generation complete. ### Build procedure for model: 'demo_arduino_blink' aborted due to an error. >>
1 Comment
Walter Roberson
on 21 Dec 2011
http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Answers (2)
Kaustubha Govind
on 21 Dec 2011
It looks like the version of the package you have installed was developed for MATLAB R2011b, which contains the function Simulink.fileGenControl. Since you are using R2009b, this file may not be present in that version.
0 Comments
Rolfe Dlugy-Hegwer
on 4 Dec 2012
Kaustubha is correct. The Simulink Support Package for Arduino Hardware is not supported on 2009b.
0 Comments
See Also
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!