Build error in function rt_MatMultAndIncCC_Dbl

Post Reply
roel
Posts: 4
Joined: Fri Jan 15, 2010 12:38 am

Build error in function rt_MatMultAndIncCC_Dbl

Post by roel » Fri Jan 15, 2010 12:53 am

Hello,

I was trying to build the example MDLs from your toolbox but got the same error everytime.
Even when I use an empty MDL with just the master block in I get it.

Here the last part of my screendump describing the problem:

Code: Select all

### Processing Template Makefile: D:\microchip\MatlabSimulink\dspic\dspic_pic30_gcc.tmf
### Creating untitled.mk from D:\microchip\MatlabSimulink\dspic\dspic_pic30_gcc.tmf
### Building untitled: .\untitled.bat
 
D:\microchip\MatlabSimulink\projects\1. testbuild\untitled_dspic\sources>set MATLAB=D:\MATLAB\R2007b  
 
D:\microchip\MatlabSimulink\projects\1. testbuild\untitled_dspic\sources>"D:\MATLAB\R2007b\bin\win32\gmake" -f untitled.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..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\MICROC~1\MATLAB~1\projects\1074C~1.TES\UNTITL~1\sources -ID:\MICROC~1\MATLAB~1\projects\1074C~1.TES -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\MICROC~1\MPLABC~2\include    untitled_main.c 
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2	 -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\MICROC~1\MATLAB~1\projects\1074C~1.TES\UNTITL~1\sources -ID:\MICROC~1\MATLAB~1\projects\1074C~1.TES -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\MICROC~1\MPLABC~2\include    untitled.c 
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2	 -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\MICROC~1\MATLAB~1\projects\1074C~1.TES\UNTITL~1\sources -ID:\MICROC~1\MATLAB~1\projects\1074C~1.TES -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\MICROC~1\MPLABC~2\include    D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c 
D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c: In function 'rt_MatMultAndIncCC_Dbl': 
D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c:54: error: unrecognizable insn: 
(0x00f5a7f8) (insn 233 75 76 6 (set (reg:SF 2 w2 [ A2_val$im ]) 
        (mem/s/j:SF (plus:P16APSV (reg/v/f:P16APSV 14 w14 [orig:57 A2 ] [57]) 
                (const_int 4 [0x4])) [0 <variable>.im+0 S4 A16])) -1 (nil) 
    (nil)) 
D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c:54: internal compiler error: in extract_insn, at recog.c:2020 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://support.microchip.com> for instructions. 
gmake: *** [rt_matmultandinccc_dbl.o] Error 255 
### Real-Time Workshop build procedure for model: 'untitled' aborted due to an error.
======================================================================
= C30 directory not found ============================================
======================================================================
======================================================================
======================================================================
Enter C30 compiler directory (like C:\Program Files\Microchip\MPLAB C30
 (You have to do it twice, copy-past)
 ---->C:\Microchipv830\MPLAB C30
C30 Compiler found
C30 Compiler found
Seems that the build proces is missing some standard Simulink RTW information.
I am using a fresh Matlab R2007b installation + RTW and embedded coder + C30ComboLite_v3_22 + blockset v201

I get the following from my workspace:

Code: Select all

>> !pic30-gcc
pic30-coff-gcc.exe: no input files 
>> !gmake
gmake: *** No targets specified and no makefile found.  Stop. 
>>
 
Thanks for your help,
Roel Leenen

PS: good produkt, good docu, good forum. Really motivates me to get started

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Fri Jan 15, 2010 2:30 am

Hi Roel Leenen,

Thanks for all theses informations.
I tested recently the blockset with the C30ComboLite_v3_22 compiler version and it works without problems with that compiler.

Could you
- upload the model you attempted to compile on the forum so as to make me able to reproduce the problem.
- try to compile an example model (using a dsPIC30 or 24 or PIC33, from the example blockset directory) and report the error (like what you did with your model)

Thanks for your help

It seems that you did not installed softwares on their standard directory. It should works anyway, but I did not tested all configurations.

Lubin

roel
Posts: 4
Joined: Fri Jan 15, 2010 12:38 am

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by roel » Sat Jan 16, 2010 11:24 pm

Hello Lubin,

Thanks for your fast response.

Here is the answer to your request:

1. upload of my model => see attachment testbuild.zip

2. I compiled the example model Data_Login_Matlab.mdl and got a similar error message. Below is the Matlab screendump after the build.

Code: Select all

C30 Compiler found
C30 Compiler found
C30 Compiler found
C30 Compiler found
### Starting Real-Time Workshop build procedure for model: Data_Login_Matlab
### Generating code into build directory: D:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources
PT### Invoking Target Language Compiler on Data_Login_Matlab.rtw
	tlc
	-r
	D:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources\Data_Login_Matlab.rtw
	D:\microchip\MatlabSimulink\dspic\dspic.tlc
	-OD:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources
	-ID:\microchip\MatlabSimulink\dspic
	-ID:\microchip\MatlabSimulink\blocks
	-ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources\tlc
	-ID:\MATLAB\R2007b\rtw\c\tlc\mw
	-ID:\MATLAB\R2007b\rtw\c\tlc\lib
	-ID:\MATLAB\R2007b\rtw\c\tlc\blocks
	-ID:\MATLAB\R2007b\rtw\c\tlc\fixpt
	-ID:\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_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="D:\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~2\support\dsPIC30F\gld\p30f3012.gld"
	-aLDLIBPIC="C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a  C:\PROGRA~1\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f3012-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="30f3012"
	-aGCCPATH=""
	-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 Data_Login_Matlab_types.h
.
### Writing header file Data_Login_Matlab.h
### Writing source file Data_Login_Matlab.c
### Writing header file Data_Login_Matlab_private.h
.
### Writing source file Data_Login_Matlab_data.c
### Writing header file autobuild.h
.
### Writing source file Data_Login_Matlab_main.c
### TLC code generation complete.
### Evaluating PostCodeGenCommand specified in the model

     ----------------------------------------------------
     ----------------------------------------------------
Embedded Coder for dsPIC V3.1(17-Nov-2009) for Matlab R2007b.


Licence Accorded to  Demonstration Version
                     RTWdsPIC@kerhuel.eu
                     Author : Lubin KERHUEL
                     WEBSITE : http://www.kerhuel.eu/wiki
                     
                     SIRENE : 503 920 456
                     SIRET : 503 920 456 00012

 Facturation to :    Demo
                     Demo
                     Lubin KERHUEL
                     18 avenue Joseph Lieutaud
                     13260 Cassis
                     FRANCE

     ----------------------------------------------------
Check updates and new informations at :  http://www.kerhuel.eu 
     ----------------------------------------------------

.
### Processing Template Makefile: D:\microchip\MatlabSimulink\dspic\dspic_pic30_gcc.tmf
### Data_Login_Matlab.mk which is generated from D:\microchip\MatlabSimulink\dspic\dspic_pic30_gcc.tmf is up to date
### Building Data_Login_Matlab: .\Data_Login_Matlab.bat
 
D:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources>set MATLAB=D:\MATLAB\R2007b  
 
D:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources>"D:\MATLAB\R2007b\bin\win32\gmake" -f Data_Login_Matlab.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..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab_data.c 
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2	 -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab_main.c 
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2	 -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    dsPIC_Multiplexed_out_UART1.c 
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2	 -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    dsPIC_UART1_Interrupt.c 
dsPIC_UART1_Interrupt.c: In function '_U1TXInterrupt': 
dsPIC_UART1_Interrupt.c:19: warning:  PSV model not specified for '_U1TXInterrupt'; 
   assuming 'auto_psv' this may affect latency 
dsPIC_UART1_Interrupt.c: In function '_U1RXInterrupt': 
dsPIC_UART1_Interrupt.c:31: warning:  PSV model not specified for '_U1RXInterrupt'; 
   assuming 'auto_psv' this may affect latency 
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2	 -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab.c 
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2	 -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c 
D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c: In function 'rt_MatMultAndIncCC_Dbl': 
D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c:54: error: unrecognizable insn: 
(0x00f5b7f8) (insn 233 75 76 6 (set (reg:SF 2 w2 [ A2_val$im ]) 
        (mem/s/j:SF (plus:P16APSV (reg/v/f:P16APSV 14 w14 [orig:57 A2 ] [57]) 
                (const_int 4 [0x4])) [0 <variable>.im+0 S4 A16])) -1 (nil) 
    (nil)) 
D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c:54: internal compiler error: in extract_insn, at recog.c:2020 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://support.microchip.com> for instructions. 
gmake: *** [rt_matmultandinccc_dbl.o] Error 255 
### Real-Time Workshop build procedure for model: 'Data_Login_Matlab' abort
Note: before compiling I reinstalled MPLAB and the C30 compiler into their default directory. The only exception is Matlab R2007b

Waiting for your feedback,

Regards,
Roel
Attachments
1. testbuild.zip
(73.82 KiB) Downloaded 836 times

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Mon Jan 18, 2010 12:10 pm

Hi Roel,

I had a look first at the demo example compilation (2 in your previosu message).

I tested the compilation in the same conditions :
Matlab R2007b installation + RTW and embedded coder + C30ComboLite_v3_22 + blockset v201
And no problems appears.

It compiled successfully on my computer. The compilation is incremental. Thus, I deleted the directory Data_Login_Matlab_dspic and slprj to make a brend new compilation (you should try to do the same). I get the following output :

Code: Select all

C30 Compiler found
C30 Compiler found
C30 Compiler found
C30 Compiler found
### Starting Real-Time Workshop build procedure for model: Data_Login_Matlab
### Generating code into build directory: C:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources
PPNumber of I/O PINs used : 2
TPTPTTPNumber of I/O PINs used : 2
TPNumber of I/O PINs used : 2
TT### Invoking Target Language Compiler on Data_Login_Matlab.rtw
	tlc
	-r
	C:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources\Data_Login_Matlab.rtw
	C:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\dspic\dspic.tlc
	-OC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources
	-IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\dspic
	-IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\blocks
	-IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_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_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=30f3012 -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\dsPIC30F\gld\p30f3012.gld"
	-aLDLIBPIC="C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a  C:\PROGRA~1\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f3012-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="30f3012"
	-aGCCPATH=""
	-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 Data_Login_Matlab_types.h
.
### Writing header file Data_Login_Matlab.h
### Writing source file Data_Login_Matlab.c
### Writing header file Data_Login_Matlab_private.h
.
### Writing source file Data_Login_Matlab_data.c
### Writing header file autobuild.h
### Writing source file Data_Login_Matlab_main.c
.
### TLC code generation complete.
### Creating project marker file: rtw_proj.tmw
### Evaluating PostCodeGenCommand specified in the model

     ----------------------------------------------------
     ----------------------------------------------------
Embedded Coder for dsPIC V&&Version&&(&&  Date       &&) for Matlab && Release &&.


Licence Accorded to  &&               Licence Name          &&
                     &&               Mailcontact           &&
                     &&               Companie              &&
                     &&               CompanieAddress1      &&
                     &&               CompanieAddress2      &&
                     &&               CompanieAddress3      &&
                     &&               CompanieAddress4      &&

 Facturation to :    &&               BuyerName             &&
                     &&               MailBuyer             &&
                     &&               BuyerAddress1         &&
                     &&               BuyerAddress2         &&
                     &&               BuyerAddress3         &&
                     &&               BuyerAddress4         &&

     ----------------------------------------------------
Check updates and new informations at :  www.kerhuel.eu 
     ----------------------------------------------------

.
### Processing Template Makefile: C:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\dspic\dspic_pic30_gcc.tmf
### Creating Data_Login_Matlab.mk from C:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\dspic\dspic_pic30_gcc.tmf
### Building Data_Login_Matlab: .\Data_Login_Matlab.bat
 
C:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources>set MATLAB=C:\Program Files\MATLAB\R2007b  
 
C:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources>"C:\PROGRA~1\MATLAB\R2007b\bin\win32\gmake" -f Data_Login_Matlab.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:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources -IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab_data.c 
''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:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources -IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab_main.c 
''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:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources -IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    dsPIC_Multiplexed_out_UART1.c 
''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:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources -IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    dsPIC_UART1_Interrupt.c 
dsPIC_UART1_Interrupt.c: In function '_U1TXInterrupt': 
dsPIC_UART1_Interrupt.c:19: warning:  PSV model not specified for '_U1TXInterrupt'; 
   assuming 'auto_psv' this may affect latency 
dsPIC_UART1_Interrupt.c: In function '_U1RXInterrupt': 
dsPIC_UART1_Interrupt.c:31: warning:  PSV model not specified for '_U1RXInterrupt'; 
   assuming 'auto_psv' this may affect latency 
''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:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources -IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab.c 
### Creating rtwlib.a 
''pic30-ar -r rtwlib.a rt_backsubcc_dbl.o rt_backsubcc_sgl.o rt_backsubrc_dbl.o rt_backsubrc_sgl.o rt_backsubrr_dbl.o rt_backsubrr_sgl.o rt_enab.o rt_forwardsubcc_dbl.o rt_forwardsubcc_sgl.o rt_forwardsubcr_dbl.o rt_forwardsubcr_sgl.o rt_forwardsubrc_dbl.o rt_forwardsubrc_sgl.o rt_forwardsubrr_dbl.o rt_forwardsubrr_sgl.o rt_look.o rt_look1d.o rt_look1d32.o rt_look2d32_general.o rt_look2d32_normal.o rt_look2d_general.o rt_look2d_normal.o rt_look32.o rt_lu_cplx.o rt_lu_cplx_sgl.o rt_lu_real.o rt_lu_real_sgl.o rt_matdivcc_dbl.o rt_matdivcc_sgl.o rt_matdivcr_dbl.o rt_matdivcr_sgl.o rt_matdivrc_dbl.o rt_matdivrc_sgl.o rt_matdivrr_dbl.o rt_matdivrr_sgl.o rt_matmultandinccc_dbl.o rt_matmultandinccc_sgl.o rt_matmultandinccr_dbl.o rt_matmultandinccr_sgl.o rt_matmultandincrc_dbl.o rt_matmultandincrc_sgl.o rt_matmultandincrr_dbl.o rt_matmultandincrr_sgl.o rt_matmultcc_dbl.o rt_matmultcc_sgl.o rt_matmultcr_dbl.o rt_matmultcr_sgl.o rt_matmultrc_dbl.o rt_matmultrc_sgl.o rt_matmultrr_dbl.o rt_matmultrr_sgl.o rt_sat_div_int16.o rt_sat_div_int32.o rt_sat_div_int8.o rt_sat_div_uint16.o rt_sat_div_uint32.o rt_sat_div_uint8.o rt_sat_prod_int16.o rt_sat_prod_int32.o rt_sat_prod_int8.o rt_sat_prod_uint16.o rt_sat_prod_uint32.o rt_sat_prod_uint8.o  
### rtwlib.a Created
''pic30-ld   -t --report-mem -Map ../untitled.map --heap 0  -cref -T C:\PROGRA~1\MICROC~1\MPLABC~2\support\dsPIC30F\gld\p30f3012.gld -o ..\../Data_Login_Matlab.coff  Data_Login_Matlab_data.o Data_Login_Matlab_main.o dsPIC_Multiplexed_out_UART1.o dsPIC_UART1_Interrupt.o Data_Login_Matlab.o     rtwlib.a  C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a  C:\PROGRA~1\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f3012-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libc-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a 
C:\Program Files\Microchip\MPLAB C30\bin\bin/pic30-coff-ld.exe: mode pic30_coff 
Data_Login_Matlab_data.o 
Data_Login_Matlab_main.o 
dsPIC_Multiplexed_out_UART1.o 
dsPIC_UART1_Interrupt.o 
Data_Login_Matlab.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a)crt0_standard.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a)data_init_standard.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f3012-coff.a)ConfigIntTimer1.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)floatsisf.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)feqltle.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)addsf3.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)fgtge.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)floorf.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)fmodf.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)fixunssfsi.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)mulsf3.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)fpack.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)fcompare.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)funpack2.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)futil.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)fchop.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)fmodrem.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)funpack.o 
(C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libm-coff.a)errno.o 
 
 
Program Memory  [Origin = 0x100, Length = 0x3f00] 
 
section                    address   length (PC units)   length (bytes) (dec) 
-------                    -------   -----------------   -------------------- 
.text                        0x100               0x44e           0x675  (1653) 
.text                        0x54e               0x25c           0x38a  (906) 
.dinit                       0x7aa                0x42            0x63  (99) 
.text                        0x7ec                0x14            0x1e  (30) 
.isr                         0x800                 0x2             0x3  (3) 
 
                     Total program memory used (bytes):          0xa83  (2691) 11% 
 
 
Data Memory  [Origin = 0x800, Length = 0x800] 
 
section                    address      alignment gaps    total length  (dec) 
-------                    -------      --------------    ------------------- 
.nbss                        0x800                   0            0x40  (64) 
.ndata                       0x840                   0            0x18  (24) 
.nbss                        0x858                   0             0xc  (12) 
.ndata                       0x864                   0             0x4  (4) 
.nbss                        0x868                   0             0x2  (2) 
.ndata                       0x86a                   0             0x2  (2) 
.nbss                        0x86c                   0             0x2  (2) 
 
                        Total data memory used (bytes):           0x6e  (110) 5% 
 
 
Dynamic Memory Usage 
 
region                     address                      maximum length  (dec) 
------                     -------                      --------------------- 
heap                             0                                   0  (0) 
stack                        0x86e                               0x792  (1938) 
 
                        Maximum dynamic memory (bytes):          0x792  (1938) 
 
 ================================================================
*** Embedded Target for dsPIC by Lubin KERHUEL - http://www.kerhuel.eu
 | Licence Accorded to &&               Licence Name          &&|
 |                     &&               Mailcontact           &&|
 |          Companie : &&               Companie              &&|
 |                     &&               CompanieAddress1      &&|
 |                     &&               CompanieAddress2      &&|
 |                     &&               CompanieAddress3      &&|
 |                     &&               CompanieAddress4      &&|
 | Financial Service : &&               BuyerName             &&|
 | Contact             &&               MailBuyer             &&|
 |                     &&               BuyerAddress1         &&|
 |                     &&               BuyerAddress2         &&|
 |                     &&               BuyerAddress3         &&|
 |                     &&               BuyerAddress4         &&|
 | Version &&Version&&                       &&  Date       &&  |
 | For Matlab && VerMatlab && && Release &&                     |
 ================================================================
*** Created executable: ..\../Data_Login_Matlab.coff
''pic30-bin2hex ..\../Data_Login_Matlab.coff  
*** Created executable: ..\../Data_Login_Matlab.hex
### Successful completion of Real-Time Workshop build procedure for model: Data_Login_Matlab
C30 Compiler found
C30 Compiler found
The difference is there :
mine :

Code: Select all

''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:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples\Data_Login_Matlab_dspic\sources -IC:\Mes_doccuments_Maison\prog\Matlab2\RTWdsPIC\examples -IC:\PROGRA~1\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab.c 
### Creating rtwlib.a 
''pic30-ar -r rtwlib.a rt_backsubcc_dbl.o rt_backsubcc_sgl.o rt_backsubrc_dbl.o rt_backsubrc_sgl.o rt_backsubrr_dbl.o rt_backsubrr_sgl.o rt_enab.o rt_forwardsubcc_dbl.o rt_forwardsubcc_sgl.o rt_forwardsubcr_dbl.o rt_forwardsubcr_sgl.o rt_forwardsubrc_dbl.o rt_forwardsubrc_sgl.o rt_forwardsubrr_dbl.o rt_forwardsubrr_sgl.o rt_look.o rt_look1d.o rt_look1d32.o rt_look2d32_general.o rt_look2d32_normal.o rt_look2d_general.o rt_look2d_normal.o rt_look32.o rt_lu_cplx.o rt_lu_cplx_sgl.o rt_lu_real.o rt_lu_real_sgl.o rt_matdivcc_dbl.o rt_matdivcc_sgl.o rt_matdivcr_dbl.o rt_matdivcr_sgl.o rt_matdivrc_dbl.o rt_matdivrc_sgl.o rt_matdivrr_dbl.o rt_matdivrr_sgl.o rt_matmultandinccc_dbl.o rt_matmultandinccc_sgl.o rt_matmultandinccr_dbl.o rt_matmultandinccr_sgl.o rt_matmultandincrc_dbl.o rt_matmultandincrc_sgl.o rt_matmultandincrr_dbl.o rt_matmultandincrr_sgl.o rt_matmultcc_dbl.o rt_matmultcc_sgl.o rt_matmultcr_dbl.o rt_matmultcr_sgl.o rt_matmultrc_dbl.o rt_matmultrc_sgl.o rt_matmultrr_dbl.o rt_matmultrr_sgl.o rt_sat_div_int16.o rt_sat_div_int32.o rt_sat_div_int8.o rt_sat_div_uint16.o rt_sat_div_uint32.o rt_sat_div_uint8.o rt_sat_prod_int16.o rt_sat_prod_int32.o rt_sat_prod_int8.o rt_sat_prod_uint16.o rt_sat_prod_uint32.o rt_sat_prod_uint8.o  
### rtwlib.a Created
yours :

Code: Select all

''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    Data_Login_Matlab.c
''pic30-gcc  -c -mcpu=30f3012 -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -ID:\MATLAB\R2007b/simulink/include -ID:\MATLAB\R2007b/extern/include -ID:\MATLAB\R2007b/rtw/c/src -ID:\MATLAB\R2007b/rtw/c/ert -ID:\MATLAB\R2007b/rtw/c/src/ext_mode/common -ID:\microchip\MatlabSimulink\examples\Data_Login_Matlab_dspic\sources -ID:\microchip\MatlabSimulink\examples -ID:\MATLAB\R2007b\rtw\c\libsrc   -I C:\PROGRA~1\MICROC~1\MPLABC~2\include    D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c
D:\MATLAB\R2007b\rtw\c\libsrc/rt_matmultandinccc_dbl.c: In function 'rt_MatMultAndIncCC_Dbl':
The problems seems to come from the C30 compiler (however, it works fine for me)
The C30 compiler could not compile the file rt_matmultandincrr_dbl.c.
This problem may be due to the incremental compilation porcess. You may try to compile it again, deleting first all files generated by the compiler (slpjr and directory with the model name).
Does your computer has enough memory to get the C30 compiler working fine ?
We may compare my rt_matmultandincrr_dbl.c file with yours, but they should be identical (mathworks source file)

Please report if you get anymore insight or results.

roel
Posts: 4
Joined: Fri Jan 15, 2010 12:38 am

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by roel » Tue Jan 19, 2010 12:04 am

Hi Lubin,

I am not an expert, but I am guessing that during my compilation for dsPIC certain Matlab RTW object files are missing. Hence the compiler is starting with the 'default' RTW source file 'rt_MatMultAndIncCC_Dbl'.c. I remember from other experiences that this is a typical one-time only exercise of a compiler, in this case the microchip C30, to generate object files for the dsPIC target out of the RTW source files. In your case it seems that the object files were already compiled (probably when you were using the C30 compiler for the first time) and he finds them in one of your paths.

part of your output:
### Creating rtwlib.a
''pic30-ar -r rtwlib.a rt_backsubcc_dbl.o rt_backsubcc_sgl.o rt_backsubrc_dbl.o rt_backsubrc_sgl.o rt_backsubrr_dbl.o rt_backsubrr_sgl.o rt_enab.o rt_forwardsubcc_dbl.o rt_forwardsubcc_sgl.o rt_forwardsubcr_dbl.o rt_forwardsubcr_sgl.o rt_forwardsubrc_dbl.o rt_forwardsubrc_sgl.o rt_forwardsubrr_dbl.o rt_forwardsubrr_sgl.o rt_look.o rt_look1d.o rt_look1d32.o rt_look2d32_general.o rt_look2d32_normal.o rt_look2d_general.o rt_look2d_normal.o rt_look32.o rt_lu_cplx.o rt_lu_cplx_sgl.o rt_lu_real.o rt_lu_real_sgl.o rt_matdivcc_dbl.o rt_matdivcc_sgl.o rt_matdivcr_dbl.o rt_matdivcr_sgl.o rt_matdivrc_dbl.o rt_matdivrc_sgl.o rt_matdivrr_dbl.o rt_matdivrr_sgl.o rt_matmultandinccc_dbl.o rt_matmultandinccc_sgl.o rt_matmultandinccr_dbl.o rt_matmultandinccr_sgl.o rt_matmultandincrc_dbl.o rt_matmultandincrc_sgl.o rt_matmultandincrr_dbl.o rt_matmultandincrr_sgl.o rt_matmultcc_dbl.o rt_matmultcc_sgl.o rt_matmultcr_dbl.o rt_matmultcr_sgl.o rt_matmultrc_dbl.o rt_matmultrc_sgl.o rt_matmultrr_dbl.o rt_matmultrr_sgl.o rt_sat_div_int16.o rt_sat_div_int32.o rt_sat_div_int8.o rt_sat_div_uint16.o rt_sat_div_uint32.o rt_sat_div_uint8.o rt_sat_prod_int16.o rt_sat_prod_int32.o rt_sat_prod_int8.o rt_sat_prod_uint16.o rt_sat_prod_uint32.o rt_sat_prod_uint8.o


Could you tell me were these files are located on your system ?
and could you upload this complete folder with matlab defaults ?
Maybe by overtaking these files I can overcome my problem.

The ultimate solution would be to force the compiler in some way to generate all the object files out of the source files supplied by matlab. So far I don't know how. Maybe another compiler brand would do the trick.

I will let you know when I have some results.

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Tue Jan 19, 2010 3:51 pm

Hi Roel,

I made a mistake in the previous post : I did not delete the directory created during the code generation process containing the compiled matlab library. This library that cause you trouble when compiling with the latest C30 version, only with mablab 2007b. Because the binary file were already compiled in my test, I did not see any error and compilation porcess went Ok.

Thus, very briefly, I get the same error that you get.

Matlab 2007b + C30ComboLite_v3_22 does not works togethers !
But more recent Matlab works perfectly with C30ComboLite_v3_22.

I attached the previous C30 version ( MPLAB_C_dsPICStudentv3_11B and MPLAB_C_PIC24Studentv3_11B for student, previously available on the microchip website). Install them booth and try to compile again. Delete first the two directory created by matlab (slpjr and directory created with the same name as the model you compile. )

I am sure it will be easier to change C30 compiler, (or matlab version), rather than copy different library at the right place...

Lubin

roel
Posts: 4
Joined: Fri Jan 15, 2010 12:38 am

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by roel » Wed Jan 20, 2010 5:28 pm

Hi Lubin,

Now it works! After having installed the v3.11 C30 compiler version. Seems to be a backwards compatibility issue in the Microchip compiler.

Thanks a lot,

Regards,
Roel

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Thu Jan 21, 2010 12:47 am

Hi roel,

thanks for reporting results.

As far as I remember, I think there was another problem with "multirate models" compiled with matlab 2007b. This last bug is due to matlab 2007 code generation error. (I coudl not test it right now but I'll check that next week)

Anyway, I hope you'll enjoy developing signal processing algorithms using theses powerfull automatic code generation system.

Lubin

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

Build error in RTW.genMakefileAndBuild

Post by jkavitha_john » Sat Jan 23, 2010 9:37 am

Hello,
I got an error for generating gmake file.I attached that error with this mail.I am waiting for your reply.



### Generating code into build directory: C:\Program Files\MATLAB\R2007a\work\untitled_dspic\sources
PNumber of I/O PINs used : 1
TT### Invoking Target Language Compiler on untitled.rtw
tlc
-r
C:\Program Files\MATLAB\R2007a\work\untitled_dspic\sources\untitled.rtw
C:\My Toolbox\dspic\dspic.tlc
-OC:\Program Files\MATLAB\R2007a\work\untitled_dspic\sources
-IC:\My Toolbox\dspic
-IC:\My Toolbox\blocks
-IC:\Program Files\MATLAB\R2007a\work\untitled_dspic\sources\tlc
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\mw
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\lib
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\blocks
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\fixpt
-IC:\Program Files\MATLAB\R2007a\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
-aForceParamTrailComments=0
-aGenerateComments=1
-aIgnoreCustomStorageClasses=0
-aIncHierarchyInIds=0
-aMaxRTWIdLen=31
-aShowEliminatedStatements=0
-aPrefixModelToSubsysFcnNames=1
-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\R2007a\rtw\bin\win32\gmake"
-aOPTIM_GCC="-mcpu=30f4011 -O3 -fschedule-insns -fschedule-insns2"
-aLDFLAGS="-t --report-mem -Map ../untitled.map --heap 0 -cref"
-aLDPICTYPE="-T C:\Program Files\Microchip\MPLAB C30\support\dsPIC30F\gld\p30f4011.gld"
-aLDLIBPIC="C:\Program Files\Microchip\MPLAB C30\lib\libpic30-coff.a C:\Program Files\Microchip\MPLAB C30\lib\libp30f4011-coff.a C:\Program Files\Microchip\MPLAB C30\lib\libc-coff.a C:\Program Files\Microchip\MPLAB C30\lib\libm-coff.a"
-aPIC_INCLUDES="-I C:\Program Files\Microchip\MPLAB C30\support\inc"
-aPIC_REF="30f4011"
-aGCCPATH="C:\Program Files\Microchip\MPLAB C30\bin"
-p10000


### Loading TLC function libraries

.....
### Initial pass through model to cache user defined code
### Caching model source code
................
### Writing main
.
### Writing header file untitled_types.h
### Writing header file untitled.h
.
### Writing source file untitled.c
### Writing header file untitled_private.h
### Writing source file untitled_data.c
.
### Writing header file autobuild.h
### Writing source file untitled_main.c
### TLC code generation complete.
### Creating project marker file: rtw_proj.tmw
### Evaluating PostCodeGenCommand specified in the model

----------------------------------------------------
----------------------------------------------------
Embedded Coder for dsPIC V3.1(17-Nov-2009) for Matlab R2007a.


Licence Accorded to Demonstration Version
RTWdsPIC@kerhuel.eu
Author : Lubin KERHUEL
WEBSITE : http://www.kerhuel.eu/wiki

SIRENE : 503 920 456
SIRET : 503 920 456 00012

Facturation to : Demo
Demo
Lubin KERHUEL
18 avenue Joseph Lieutaud
13260 Cassis
FRANCE

----------------------------------------------------
Check updates and new informations at : http://www.kerhuel.eu
----------------------------------------------------

.
### Processing Template Makefile: C:\My Toolbox\dspic\dspic_pic30_gcc.tmf
### Creating untitled.mk from C:\My Toolbox\dspic\dspic_pic30_gcc.tmf
### Building untitled: .\untitled.bat

C:\Program Files\MATLAB\R2007a\work\untitled_dspic\sources>set MATLAB=C:\Program Files\MATLAB\R2007a

C:\Program Files\MATLAB\R2007a\work\untitled_dspic\sources>"C:\PROGRA~1\MATLAB\R2007a\rtw\bin\win32\gmake" -f untitled.mk GENERATE_REPORT=0 ADD_MDL_NAME_TO_GLOBALS=1 MULTI_INSTANCE_CODE=0 PORTABLE_WORDSIZES=0 GENERATE_ASAP2=0 TMW_EXTMODE_TESTING=0
C:\Program Files\Microchip\MPLAB C30\binpic30-gcc -c -mcpu=30f4011 -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2007a/simulink/include -IC:\PROGRA~1\MATLAB\R2007a/extern/include -IC:\PROGRA~1\MATLAB\R2007a/rtw/c/src -IC:\PROGRA~1\MATLAB\R2007a/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2007a/rtw/c/src/ext_mode/common -IC:\PROGRA~1\MATLAB\R2007a\work\untitled_dspic\sources -IC:\PROGRA~1\MATLAB\R2007a\work -IC:\PROGRA~1\MATLAB\R2007a\rtw\c\libsrc -I C:\Program Files\Microchip\MPLAB C30\support\inc dsPIC_OutputCompare_Interrupt.c
gmake: command not found: C:\Program
gmake: *** [dsPIC_OutputCompare_Interrupt.o] Error 0x7f
### Real-Time Workshop build procedure for model: 'untitled' aborted due to an error.
C30 Compiler found
C30 Compiler found
>>

Bobes
Posts: 36
Joined: Wed Nov 25, 2009 11:27 am
Location: Brno, CZE
Contact:

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by Bobes » Sat Jan 23, 2010 10:59 am

Hello John, may be I can help... I belive I hade same problem:
Try clicking on the block "Configure Simulink for dsPIC Target", I belive you have somewhere the path in form "C:\Program Files\..." and it should be in the "DOS" format.. like this: "C:\PROGRA~1\..."
That is I think why is there this message:

Code: Select all

gmake: command not found: C:\Program 
go to Simulation/Configuration parameters ... should look similar like on the attachment, just configured bit differently for your target..
Attachments
Clipboard01.jpg

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Sun Jan 24, 2010 12:29 am

Hi John,

Bobes provided a good advice.
You may also try to click on the yellow block titled something like "configure simulink for dsPIC target". This block automatically check all path and should solve problems. If it did not do the job, I would be interrested to get the parameters of your computer to make this block algorithm even more robust.

Lubin

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

Re: About Compile Error

Post by jkavitha_john » Mon Jan 25, 2010 12:49 pm

Hi Lubin,
Thanks for your reply.I am also having another problem,
when I compile the program some error has occurred that is,
C30 Compiler found
C30 Compiler found
C30 Compiler found
### Starting Real-Time Workshop build procedure for model: untitled
### Generating code into build directory: C:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources
PT### Invoking Target Language Compiler on untitled.rtw
tlc
-r
C:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources\untitled.rtw
C:\My Toolbox\dspic\dspic.tlc
-OC:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources
-IC:\My Toolbox\dspic
-IC:\My Toolbox\blocks
-IC:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources\tlc
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\mw
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\lib
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\blocks
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\fixpt
-IC:\Program Files\MATLAB\R2007a\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
-aForceParamTrailComments=0
-aGenerateComments=1
-aIgnoreCustomStorageClasses=0
-aIncHierarchyInIds=0
-aMaxRTWIdLen=31
-aShowEliminatedStatements=0
-aPrefixModelToSubsysFcnNames=1
-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\R2007a\rtw\bin\win32\gmake"
-aOPTIM_GCC="-mcpu=30f4011 -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\dsPIC30F\gld\p30f4011.gld"
-aLDLIBPIC="C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f4011-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="30f4011"
-aGCCPATH=""
-p10000


### Loading TLC function libraries

....
### Initial pass through model to cache user defined code
.
### Caching model source code
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (4) was out of the range 0 - 3
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (5) was out of the range 0 - 3
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (6) was out of the range 0 - 3
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (7) was out of the range 0 - 3
...........
### Writing main
.
### Writing header file untitled_types.h
### Writing header file untitled.h
.
### Writing source file untitled.c
### Writing header file untitled_private.h
### Writing source file untitled_data.c
.
### Writing header file autobuild.h
### Writing source file untitled_main.c
### TLC code generation complete.
### Real-Time Workshop build procedure for model: 'untitled' aborted due to an error.
C30 Compiler found
C30 Compiler found

How can I solved it,please help me.
Last edited by jkavitha_john on Wed Jan 27, 2010 12:09 pm, edited 2 times in total.

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Mon Jan 25, 2010 6:32 pm

Thus, installed examples do not compile when you install it newly, but the models you created, that are thus not replaced compile ?
This is due to path. The examples path are set for my computer. However, theses path error should be corrected with the yellow block "configure simulink for dsPIC"
Lubin

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

Re: About Compile Error

Post by jkavitha_john » Thu Jan 28, 2010 9:58 am

Hi Lubin,
Thanks for your reply.I am also having another problem,
when I compile the program some error has occurred that is,
C30 Compiler found
C30 Compiler found
C30 Compiler found
### Starting Real-Time Workshop build procedure for model: untitled
### Generating code into build directory: C:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources
PT### Invoking Target Language Compiler on untitled.rtw
tlc
-r
C:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources\untitled.rtw
C:\My Toolbox\dspic\dspic.tlc
-OC:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources
-IC:\My Toolbox\dspic
-IC:\My Toolbox\blocks
-IC:\Documents and Settings\User\Desktop\matlab dspic\programs\led\untitled_dspic\sources\tlc
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\mw
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\lib
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\blocks
-IC:\Program Files\MATLAB\R2007a\rtw\c\tlc\fixpt
-IC:\Program Files\MATLAB\R2007a\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
-aForceParamTrailComments=0
-aGenerateComments=1
-aIgnoreCustomStorageClasses=0
-aIncHierarchyInIds=0
-aMaxRTWIdLen=31
-aShowEliminatedStatements=0
-aPrefixModelToSubsysFcnNames=1
-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\R2007a\rtw\bin\win32\gmake"
-aOPTIM_GCC="-mcpu=30f4011 -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\dsPIC30F\gld\p30f4011.gld"
-aLDLIBPIC="C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a C:\PROGRA~1\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f4011-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="30f4011"
-aGCCPATH=""
-p10000


### Loading TLC function libraries

....
### Initial pass through model to cache user defined code
.
### Caching model source code
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (4) was out of the range 0 - 3
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (5) was out of the range 0 - 3
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (6) was out of the range 0 - 3
Error: File: C:\My Toolbox\blocks\dsPIC_MASTER.tlc Line: 113 Column: 62
The specified index (7) was out of the range 0 - 3
...........
### Writing main
.
### Writing header file untitled_types.h
### Writing header file untitled.h
.
### Writing source file untitled.c
### Writing header file untitled_private.h
### Writing source file untitled_data.c
.
### Writing header file autobuild.h
### Writing source file untitled_main.c
### TLC code generation complete.
### Real-Time Workshop build procedure for model: 'untitled' aborted due to an error.
C30 Compiler found
C30 Compiler found

How can I solved it,please help me.

Bobes
Posts: 36
Joined: Wed Nov 25, 2009 11:27 am
Location: Brno, CZE
Contact:

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by Bobes » Thu Jan 28, 2010 8:29 pm

Seems like some timer problem, you should probably post your mdl file here. Without that its quite hard to find the problem. However I have encountered this problem as well, but I do not recall what was the cause.

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

Re: PWM Motor Output

Post by jkavitha_john » Fri Mar 05, 2010 6:22 am

Hi Lubin,
I have generated a mdl file with PWM Motor Output. The hex file is generated but the output is not coming.I have attached my mdl file .Please tell me what the reason,the ouput is not coming.
pwm.mdl
(23.27 KiB) Downloaded 966 times

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Fri Mar 05, 2010 8:34 am

The model is composed of constants attached to a PWM motor blocks.

Two possible problems :
first one : const blocks has a default sampling time set to "inf". This mean that they are typically "executed" only once, and blocks depending only on theses values (here PWM blocks) will inherit this "inf" sampling time. Thus it will be executed only once and that's not very good.
==> Set const sampling time to .01 for example on at least one (or all) constant connected to the PWM block.

Second one : the Period and the duty cycle are set with the same value of 1000. Thus, the duty cycle will be of 100% inyour case, you won't see anything at the output.
PWM1 value should be set to a lower value than the Period (set it to 1/2 ==> 500 for example)

Lubin

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

PWM Output

Post by jkavitha_john » Wed Mar 10, 2010 7:45 am

Hi Lubin,
I had set .01 to the constant value but the ouput is not coming.I attached my mdl file and also the constant properties.
pwm.mdl
(23.55 KiB) Downloaded 947 times
Doc1.doc
(239 KiB) Downloaded 955 times

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Wed Mar 10, 2010 8:23 am

It should works.
do you use a scope to check if that's works ? the PWM output is here quite fast :

frequency is : 1/ (4.194303e-001 * 1000 / 65534) = 156Hz.
If you use a "voltmetre" , you will probably see VDD/2, typically 2.5V.

Anyway, please try to change in the Master block, Time Step reference :
from FreeRun into Timer1 based as this is more commonly used.

You may check that the dsPIC is running by activating a busy flag port, on the pin you select, in the master block. This busy flag should "flash" at the same frequency as the model : 0.01Hz here. (but as the model's calculation is nothing, it will be very very short and need also a scope to be detected.


Please let me know !
Lubin

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

Re: PWM Ouput

Post by jkavitha_john » Wed Mar 10, 2010 10:27 am

Hi Lubin,
I have change that settings but the output is not coming.Can u give me the working mdl file,please.

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

PWM Ouput

Post by jkavitha_john » Thu Mar 11, 2010 7:54 am

Hi Lubin,

Thanks for ur reply,Now its coming.I changed my compiler v2.01 to v3.11.Pwm Output is coming.But I dont know,how can I calculate the freq.please tell me the formula.

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Thu Mar 11, 2010 8:25 am

You should find information here : http://www.kerhuel.eu/wiki/Block/PWM_Motor_Output
hope it's clear enough as it seem to be tricky when I am reading it today !

feel free to edit the wiki, and let me know for unclear point.

Lubin

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

PWM Ouput

Post by jkavitha_john » Fri Mar 12, 2010 6:23 am

Hi Lubin,
Thanks for ur reply.I can find the freq calculation.I have one question, real time datas sent from Matlab to dsPIC Controller is it possibe or not.

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

Re: Build error in function rt_MatMultAndIncCC_Dbl

Post by LubinKerhuel » Fri Mar 12, 2010 8:29 am

It's possible to send data from matlab to the dsPIC throw the rs232gui interface for example.
However, that will not be real time as Matlab is not realtime !
Thus, you will be able to send set-point, or to change gain during execution of the dsPIC realtime program, but you will not do a realtime cosimulation including booth a dsPIC and Matlab.

Lubin

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

PWM Output

Post by jkavitha_john » Sat Mar 13, 2010 7:54 am

Hai Lubin,
Thanks for ur reply.Can I find the freq by using blocks only, without any constant value.

jkavitha_john
Posts: 14
Joined: Sat Jan 23, 2010 9:20 am

PWM Output

Post by jkavitha_john » Sat Mar 13, 2010 11:58 am

Hi,
How can I calculate for setting the PWM dead time.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests