Some help needed : Error while compiling

Post Reply
barryforever
Posts: 11
Joined: Sun Feb 17, 2008 2:58 pm

Some help needed : Error while compiling

Post by barryforever » Sun Feb 17, 2008 3:55 pm

I tried doing some program and it dint go all that easy showed me error every time .
I even tried your sinusoidal signal servo control it showed me error
I use a R2007b with all required toolboxes
The first error i get when put dspic master into a new model areai get the following warning in matlab workspace

Code: Select all

Warning: Error evaluating 'LoadFcn' callback of Master block (mask) 'Master'. Error using
==> dsPIC_ConfigRTWOption at 34
The *System Target File must be defined to dsPIC Real Time workshop (Simulation ==>
Configuration Parameters ==> Real Time workshop.
> In load_system at 52
  In libbrowse>i_LoadSys at 142
  In libbrowse>LoadLibrary at 121
  In libbrowse at 24
TimeStep was undefined and is set to : 0.001
Then i put the simulink configuration in the model.

I used a digital input and a digital write output ..
which means that what ever i give in port b 1 i should be able to get port b 2 right ?
then i compiled things in with generate code only as worshop parameter and it compiled without error.

Code: Select all

Warning: The dialog of 'mika/Master' is being closed because a mask
parameter has been changed.
> In C:\toolbox\blocks\dsPIC_Set_Dialog_PopUp_Param.p>dsPIC_Set_Dialog_PopUp_Param at 57
  In C:\toolbox\blocks\dsPIC_MASTER_callback_InitMask.p>dsPIC_MASTER_callback_InitMask at 225
Number of I/O PINs used : 2
Number of I/O PINs used : 2
Number of I/O PINs used : 2
### Starting Real-Time Workshop build procedure for model: mika
### Generating code into build directory: C:\Documents and Settings\Barry\My Documents\MATLAB\mouline\mika_dspic\sources
Warning: Source 'mika/Digital Input' specifies that its sample time (-1) is
back-inherited. You should explicitly specify the sample time of sources.
You can disable this diagnostic by setting the 'Source block specifies -1
sample time' diagnostic to 'none' in the Sample Time group on the
Diagnostics pane of the Configuration Parameters dialog box.
### Invoking Target Language Compiler on mika.rtw
	tlc
	-r
	C:\Documents and Settings\Barry\My Documents\MATLAB\mouline\mika_dspic\sources\mika.rtw
	C:\toolbox\dspic\dspic.tlc
	-OC:\Documents and Settings\Barry\My Documents\MATLAB\mouline\mika_dspic\sources
	-IC:\toolbox\dspic
	-IC:\toolbox\blocks
	-IC:\Documents and Settings\Barry\My Documents\MATLAB\mouline\mika_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=1
	-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_table_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=30F6011 -O3 -fschedule-insns -fschedule-insns2"
	-aLDFLAGS="-t --report-mem -Map ../untitled.map --heap 0  -cref"
	-aLDPICTYPE="-T C:\PROGRA~1\MICROC~1\MPLABC~2\support\gld\p30f6011.gld"
	-aLDLIBPIC="C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a  C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libp30F6011-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libc-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a"
	-aPIC_INCLUDES="-I C:\PROGRA~1\MICROC~1\MPLABC~2\include"
	-aPIC_REF="30f6011"
	-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 mika_types.h
.
### Writing header file mika.h
### Writing source file mika.c
### Writing header file mika_private.h
.
### Writing header file autobuild.h
### Writing source file mika_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.96b(13-Feb-2008) for Matlab R2007b.
Licence Accorded to Demonstration Version - 


informations available at  www.kerhuel.eu 

.
### Processing Template Makefile: C:\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 mika.mk from C:\toolbox\dspic\dspic_pic30_gcc.tmf
### Successful completion of Real-Time Workshop build procedure for model: mika

Now what do i do with the bat file created there is no hex file generation in the folder.
I tried using MPLAB to make the required files
it also gave me error :

Code: Select all

Opening Matlab session and model 'C:\Documents and Settings\Barry\My Documents\MATLAB\mouline\mika.mdl'
Please wait...

Warning: Error evaluating 'LoadFcn'
callback of Master block (mask) 'Master'.
Error using ==> dsPIC_ConfigRTWOption at 34
The *System Target File must be defined to
dsPIC Real Time workshop (Simulation ==>
Configuration Parameters ==> Real Time
workshop.
> In <a href="error:C:\Program Files\Microchip\MPLAB IDE\Tools\Matlab\MplabOpenModel.m,14,1">MplabOpenModel at 14</a>

Attachments
mouline.zip
all my model and generated files
(34.79 KiB) Downloaded 570 times

micman2
Posts: 20
Joined: Wed Feb 13, 2008 9:24 am

Re: Some help needed : Error while compiling

Post by micman2 » Sun Feb 17, 2008 8:39 pm

Hi,

i teset the code and not have problem:

Warning: Error evaluating 'LoadFcn' callback of Master block (mask) 'Master'. Error using ==>
dsPIC_ConfigRTWOption at 34
The *System Target File must be defined to dsPIC Real Time workshop (Simulation ==> Configuration
Parameters ==> Real Time workshop.
> In general\private\openmdl at 13
In open at 148
In uiopen at 196
Number of I/O PINs used : 2
Number of I/O PINs used : 2
### Starting Real-Time Workshop build procedure for model: mika
### Generating code into build directory: C:\Documents and Settings\Michele\Desktop\Nuova cartella\mouline\mika_dspic\sources
Number of I/O PINs used : 2
Warning: Source 'mika/Digital Input' specifies that its sample time (-1) is back-inherited. You should
explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source
block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of
the Configuration Parameters dialog box.
### Invoking Target Language Compiler on mika.rtw
tlc
-r
C:\Documents and Settings\Michele\Desktop\Nuova cartella\mouline\mika_dspic\sources\mika.rtw
C:\MyToolBox\dspic\dspic.tlc
-OC:\Documents and Settings\Michele\Desktop\Nuova cartella\mouline\mika_dspic\sources
-IC:\MyToolBox\dspic
-IC:\MyToolBox\blocks
-IC:\Documents and Settings\Michele\Desktop\Nuova cartella\mouline\mika_dspic\sources\tlc
-IC:\Programmi\MATLAB\R2007b\rtw\c\tlc\mw
-IC:\Programmi\MATLAB\R2007b\rtw\c\tlc\lib
-IC:\Programmi\MATLAB\R2007b\rtw\c\tlc\blocks
-IC:\Programmi\MATLAB\R2007b\rtw\c\tlc\fixpt
-IC:\Programmi\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=1
-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_table_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=30F6011 -O3 -fschedule-insns -fschedule-insns2"
-aLDFLAGS="-t --report-mem -Map ../untitled.map --heap 0 -cref"
-aLDPICTYPE="-T C:\PROGRA~1\MICROC~1\MPLABC~2\support\gld\p30f6011.gld"
-aLDLIBPIC="C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libp30F6011-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libc-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a"
-aPIC_INCLUDES="-I C:\PROGRA~1\MICROC~1\MPLABC~2\include"
-aPIC_REF="30f6011"
-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 mika_types.h
.
### Writing header file mika.h
### Writing source file mika.c
### Writing header file mika_private.h
.
### Writing header file autobuild.h
### Writing source file mika_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.96b(13-Feb-2008) for Matlab R2007b.
Licence Accorded to Demonstration Version -


informations available at http://www.kerhuel.eu

.
### Processing Template Makefile: C:\MyToolBox\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 mika.mk from C:\MyToolBox\dspic\dspic_pic30_gcc.tmf
### Successful completion of Real-Time Workshop build procedure for model: mika
>>

barryforever
Posts: 11
Joined: Sun Feb 17, 2008 2:58 pm

Re: Some help needed : Error while compiling

Post by barryforever » Mon Feb 18, 2008 1:50 pm

in RTW it get compiled very well but what about the hex file generation while getting compiled
I dont see any..

I tried compiling using mplab by connecting to matlab i received a error ..

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Bayonne- France
Contact:

Re: Some help needed : Error while compiling

Post by LubinKerhuel » Mon Feb 18, 2008 8:47 pm

I suggest to compile from simulink (matlab)

to get your .hex file, uncheck the "generate code only", see post : viewtopic.php?f=1&t=89#p225

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests