I downloaded the DSPic toolbox for Simulink and I'm having some troubles making it work. I think it has something to do with the generation of the make file.
Here is what is displayed on the Matlab command window when trying to compile the "Servo_Sinus" example:
Code: Select all
### Starting Real-Time Workshop build procedure for model: Servo_Sinus
### Generating code into build directory: C:\dspic_toolbox\examples\Servo_Sinus_dspic\sources
Number of I/O PINs used : 1
Number of I/O PINs used : 1
Number of I/O PINs used : 1
Number of I/O PINs used : 1
Number of I/O PINs used : 1
### Invoking Target Language Compiler on Servo_Sinus.rtw
tlc
-r
C:\dspic_toolbox\examples\Servo_Sinus_dspic\sources\Servo_Sinus.rtw
C:\dspic_toolbox\dspic\dspic.tlc
-OC:\dspic_toolbox\examples\Servo_Sinus_dspic\sources
-IC:\dspic_toolbox\dspic
-IC:\dspic_toolbox\blocks
-IC:\dspic_toolbox\examples\Servo_Sinus_dspic\sources\tlc
-IC:\Program Files\MATLAB\R2007b\rtw\c\tlc\mw
-IC:\Program Files\MATLAB\R2007b\rtw\c\tlc\lib
-IC:\Program Files\MATLAB\R2007b\rtw\c\tlc\blocks
-IC:\Program Files\MATLAB\R2007b\rtw\c\tlc\fixpt
-IC:\Program Files\MATLAB\R2007b\stateflow\c\tlc
-aEnforceIntegerDowncast=1
-aFoldNonRolledExpr=1
-aInlineInvariantSignals=0
-aInlineParameters=0
-aLocalBlockOutputs=1
-aRollThreshold=5
-aZeroInternalMemoryAtStartup=1
-aZeroExternalMemoryAtStartup=1
-aInitFltsAndDblsToZero=1
-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
-aSimulinkBlockComments=1
-aInlinedPrmAccess="Literals"
-aTargetFcnLib="ansi_tfl_tmw.mat"
-aGenFloatMathFcnCalls="ANSI_C"
-aIsPILTarget=0
-aIncludeMdlTerminateFcn=0
-aCombineOutputUpdateFcns=1
-aSuppressErrorStatus=1
-aERTCustomFileBanners=1
-aLogVarNameModifier="rt_"
-aGenerateFullHeader=1
-aGenerateSampleERTMain=0
-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="dsPIC_main.tlc"
-aGMAKE_PLACE="C:\PROGRA~1\MATLAB\R2007b\bin\win32\gmake"
-aOPTIM_GCC="-mcpu=30F3012 -O3 -fschedule-insns -fschedule-insns2"
-aLDFLAGS="-t --report-mem -Map ../untitled.map --heap 0 -cref"
-aLDPICTYPE="-T C:\PROGRA~1\MICROC~1\MPLABC~1\support\gld\p30f3012.gld"
-aLDLIBPIC="C:\PROGRA~1\MICROC~1\MPLABC~1\lib\libpic30-coff.a C:\PROGRA~1\MICROC~1\MPLABC~1\lib\libp30F3012-coff.a C:\PROGRA~1\MICROC~1\MPLABC~1\lib\libc-coff.a C:\PROGRA~1\MICROC~1\MPLABC~1\lib\libm-coff.a"
-aPIC_INCLUDES="-IC:\PROGRA~1\MICROC~1\MPLABC~1\include"
-aPIC_REF="30f3012"
-aGenerateTraceInfo=0
-p10000
### Loading TLC function libraries
....
### Initial pass through model to cache user defined code
.
### Caching model source code
.............
### Writing main
.
### Writing header file Servo_Sinus_types.h
### Writing header file Servo_Sinus.h
.
### Writing source file Servo_Sinus.c
### Writing header file Servo_Sinus_private.h
### Writing source file Servo_Sinus_data.c
.
### Writing header file autobuild.h
### Writing source file Servo_Sinus_main.c
### TLC code generation complete.
### Creating project marker file: rtw_proj.tmw
### Evaluating PostCodeGenCommand specified in the model
Companie =
''
----------------------------------------------------
Embedded Coder for dsPIC V0.97(01-Apr-2008) for Matlab R2007b.
Licence Accorded to Demonstration Version -
informations available at http://www.kerhuel.eu
.
### Processing Template Makefile: C:\dspic_toolbox\dspic\dspic_pic30_gcc.tmf
### Wrapping unrecognized make command (angle brackets added)
### <C:\PROGRA~1\MATLAB\R2007b\bin\win32\gmake>
### in default batch file
### Creating Servo_Sinus.mk from C:\dspic_toolbox\dspic\dspic_pic30_gcc.tmf
### Building Servo_Sinus: .\Servo_Sinus.bat
C:\dspic_toolbox\examples\Servo_Sinus_dspic\sources>set MATLAB=C:\Program Files\MATLAB\R2007b
C:\dspic_toolbox\examples\Servo_Sinus_dspic\sources>C:\PROGRA~1\MATLAB\R2007b\bin\win32\gmake -f Servo_Sinus.mk GENERATE_REPORT=0 MULTI_INSTANCE_CODE=0 PORTABLE_WORDSIZES=0 GENERATE_ASAP2=0 TMW_EXTMODE_TESTING=0
pic30-gcc -c -mcpu=30F3012 -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2007b/simulink/include -IC:\PROGRA~1\MATLAB\R2007b/extern/include -IC:\PROGRA~1\MATLAB\R2007b/rtw/c/src -IC:\PROGRA~1\MATLAB\R2007b/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2007b/rtw/c/src/ext_mode/common -IC:\dspic_toolbox\examples\Servo_Sinus_dspic\sources -IC:\dspic_toolbox\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc -IC:\PROGRA~1\MICROC~1\MPLABC~1\include Servo_Sinus_data.c
process_begin: CreateProcess(NULL, pic30-gcc -c -mcpu=30F3012 -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2007b/simulink/include -IC:\PROGRA~1\MATLAB\R2007b/extern/include -IC:\PROGRA~1\MATLAB\R2007b/rtw/c/src -IC:\PROGRA~1\MATLAB\R2007b/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2007b/rtw/c/src/ext_mode/common -IC:\dspic_toolbox\examples\Servo_Sinus_dspic\sources -IC:\dspic_toolbox\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc -IC:\PROGRA~1\MICROC~1\MPLABC~1\include Servo_Sinus_data.c, ...) failed.
make (e=2): Le fichier spécifié est introuvable.
gmake: *** [Servo_Sinus_data.o] Error 2
### Real-Time Workshop build procedure for model: 'Servo_Sinus' aborted due to an error.
Error building Real-Time Workshop target for block diagram 'Servo_Sinus'. MATLAB error message:
Error using ==> genMakefileAndBuild at 1070
Error(s) encountered while building model "Servo_Sinus".
Maybe I missed something in the Configuration Parameters...
I've been trying to make it work for two whole days and I'm out of ideas.
Has anyone had a similar problem?
Thanks in advance for your help.
Julien.