Matlab: Error while building model

Posts: 8
Joined: Thu Jan 31, 2008 8:39 am

Matlab: Error while building model

Postby johan.b » Thu Jan 31, 2008 8:50 am

Hello all,
I discovered this blockset and it seems really interessant for my field of activity. I donwloaded files for Matlab R2007b and I followed the instructions of installation.
I downloaded the student version of MPLAB C30 and I tried to build my own model: but it was an error during the build:

Error building Real-Time Workshop target for block diagram 'Servo_ADC'. MATLAB error message:
Error using ==> genMakefileAndBuild at 1070
Error(s) encountered while building model "Servo_ADC".

Then I tried to find the source of error ... without success !
Finally I tried with the sample file Servo_ADC.mdl and I have the same error.

Maybe somebody can help me. You can find below for the detailed description of error. Thanks in advance.


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 general\private\openmdl at 13
  In open at 148
  In uiopen at 196
Warning: In instantiating linked block 'Servo_ADC/ADC Input' : Invalid setting
in dsPIC : ADC10 block (mask) 'ADC Input' for parameter 'OutFormatBitspopup'.
> In C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\blocks\dsPIC_PWM_OC_callback.p>dsPIC_PWM_OC_callback at 94
  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: Servo_ADC
### Generating code into build directory: C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\examples\Servo_ADC_dspic\sources
Number of I/O PINs used : 2
Number of I/O PINs used : 2
Number of I/O PINs used : 2
Warning: Source 'Servo_ADC/ADC 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 Servo_ADC.rtw
   C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\examples\Servo_ADC_dspic\sources\Servo_ADC.rtw
   C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\dspic\dspic.tlc
   -OC:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\examples\Servo_ADC_dspic\sources
   -IC:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\dspic
   -IC:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\blocks
   -IC:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\examples\Servo_ADC_dspic\sources\tlc
   -aOPTIM_GCC="-mcpu=30F3012 -O3 -fschedule-insns -fschedule-insns2"
   -aLDFLAGS="-t --report-mem -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"

### Loading TLC function libraries

### Initial pass through model to cache user defined code
### Caching model source code
### Writing main
### Writing header file Servo_ADC_types.h
### Writing header file Servo_ADC.h
### Writing source file Servo_ADC.c
### Writing header file Servo_ADC_private.h
### Writing source file Servo_ADC_data.c
### Writing header file autobuild.h
### Writing source file Servo_ADC_main.c
### TLC code generation complete.
### Evaluating PostCodeGenCommand specified in the model

Companie =


Embedded Coder for dsPIC V0.95b(09-Dec-2007) for Matlab R2007b.
Licence Accorded to Demonstration Version -
informations available at
### Processing Template Makefile: C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\dspic\dspic_pic30_gcc.tmf
### Wrapping unrecognized make command (angle brackets added)
###    <C:\MATLAB~1\bin\win32\gmake>
### in default batch file
### Creating from C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\dspic\dspic_pic30_gcc.tmf
### Building Servo_ADC: .\Servo_ADC.bat
C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\examples\Servo_ADC_dspic\sources>set MATLAB=C:\MATLAB_R2007b 
C:\Documents and Settings\Johan.INSPIRON\Mes documents\MATLAB\install_dsPIC_R2007b\examples\Servo_ADC_dspic\sources>C:\MATLAB~1\bin\win32\gmake -f  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:\MATLAB~1/simulink/include -IC:\MATLAB~1/extern/include -IC:\MATLAB~1/rtw/c/src -IC:\MATLAB~1/rtw/c/ert -IC:\MATLAB~1/rtw/c/src/ext_mode/common -IC:\DOCUME~1\JOHAN~1.INS\MESDOC~1\MATLAB\INSTAL~1\examples\SERVO_~1\sources -IC:\DOCUME~1\JOHAN~1.INS\MESDOC~1\MATLAB\INSTAL~1\examples -IC:\MATLAB~1\rtw\c\libsrc   -IC:\PROGRA~1\MICROC~1\MPLABC~1\include    Servo_ADC_data.c
pic30-gcc  -c -mcpu=30F3012 -O3 -fschedule-insns -fschedule-insns2    -O   -I. -I..\.. -IC:\MATLAB~1/simulink/include
[color=#0000FF][Removed Part ...][/color]
-IC:\MATLAB~1/extern/include -IC:\MATLAB~1/rtw/c/src -IC:\MATLAB~1/rtw/c/ert -IC:\MATLAB~1/rtw/c/src/ext_mode/common -IC:\DOCUME~1\JOHAN~1.INS\MESDOC~1\MATLAB\INSTAL~1\examples\SERVO_~1\sources -IC:\DOCUME~1\JOHAN~1.INS\MESDOC~1\MATLAB\INSTAL~1\examples -IC:\MATLAB~1\rtw\c\libsrc   -IC:\PROGRA~1\MICROC~1\MPLABC~1\include    C:\MATLAB~1\rtw\c\libsrc/rt_sat_prod_uint8.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 ../ --heap 0  -cref -T C:\PROGRA~1\MICROC~1\MPLABC~1\support\gld\p30f3012.gld -o ..\../Servo_ADC.coff  Servo_ADC_data.o Servo_ADC_main.o dsPIC_OutputCompare_Interrupt.o Servo_ADC.o     rtwlib.a  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
C:\Program Files\Microchip\MPLAB C30\bin\pic30-coff-ld.exe: cannot open linker script file C:\PROGRA~1\MICROC~1\MPLABC~1\support\gld\p30f3012.gld: No such file or directory
gmake: *** [..\../Servo_ADC.coff] Error 255
### Real-Time Workshop build procedure for model: 'Servo_ADC' aborted due to an error.


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

Re: Matlab: Error while building model

Postby LubinKerhuel » Thu Jan 31, 2008 9:15 am

H Johan,

It seems it is the same problem : have a look on the following topic

sumedhk get similar error : a missing gld file was reported. could you try the solution explained on the topic : Issues in dsPIC 30f6014 compiling : Missing gld & DCI Periph :

Ant let me know if you still get the error.

Posts: 8
Joined: Thu Jan 31, 2008 8:39 am

Re: Matlab: Error while building model

Postby johan.b » Thu Jan 31, 2008 9:49 am

Ok and thank you for your answer. I will try this solution on my model and I shall let you know if it works.

Posts: 8
Joined: Thu Jan 31, 2008 8:39 am

Re: Matlab: Error while building model

Postby johan.b » Thu Jan 31, 2008 6:29 pm

I've just tried your solution and it seems to work properly. Many thanks !

Return to “Requirement, Installation & Configuration”

Who is online

Users browsing this forum: No registered users and 2 guests