genMakefileAndBuild

Post Reply
aunanshi@yahoo.com
Posts: 5
Joined: Sat Jan 19, 2008 5:42 pm

genMakefileAndBuild

Post by aunanshi@yahoo.com » Sat Jan 19, 2008 6:04 pm

Encounter error msg below when compile/build even with simple block. Please advice


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

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

Re: genMakefileAndBuild

Post by LubinKerhuel » Sat Jan 19, 2008 7:09 pm

Hi, could you upload on the forum the simulink file that generate that error ?

aunanshi@yahoo.com
Posts: 5
Joined: Sat Jan 19, 2008 5:42 pm

Re: genMakefileAndBuild

Post by aunanshi@yahoo.com » Sun Jan 20, 2008 7:36 am

Thanks for the reply. Me actually trying "my first example" as illustrated in example.
Attachments
try3.mdl
(23.61 KiB) Downloaded 730 times

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

Re: genMakefileAndBuild

Post by LubinKerhuel » Mon Jan 21, 2008 12:06 am

Hi Aunanshi

The mdl file 'try3.mdl' compile successfully on my system. Could you provide more details on the error : Which matlab version are you using, Is real time workshop and Real Time Workshop Embedded Coder installed on your system, Which version of the C30 compiler are you using ; Is this the complete error message ? In which directory is it installed ...

Also, you could browse this forum; some topics are about the installation of the blockset. If you do not find a solution, please ask again.

aunanshi@yahoo.com
Posts: 5
Joined: Sat Jan 19, 2008 5:42 pm

Re: genMakefileAndBuild

Post by aunanshi@yahoo.com » Tue Jan 22, 2008 3:10 am

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: *** [..\../try3.coff] Error 255
### Real-Time Workshop build procedure for model: 'try3' aborted due to an error.

error msg as above.

me using matlab 7.5.0 (R2007b)
MPLAB_C30_v3_02-studentEdition <== could this be the problem, if yes where can get usable version(Free or trial version) ?

I also saw forum posted by Mr.Peter. You replying "The toolbox must not be installed in the matlab directory or subdirectory. Make sure you did not install the toolbox inside the matlab directory or sudirectory ! " which toolbox are you refering to?

Regards,
Nanshi

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

Re: genMakefileAndBuild

Post by LubinKerhuel » Tue Jan 22, 2008 10:06 am

Hi Nanshi,
aunanshi@yahoo.com wrote:MPLAB_C30_v3_02-studentEdition <== could this be the problem, if yes where can get usable version (Free or trial version) ?
This is not the problem: the student version of the C30_V3_02 work with the dsPIC blockset !
aunanshi@yahoo.com wrote:I also saw forum posted by Mr.Peter. You replying "The toolbox must not be installed in the matlab directory or subdirectory. Make sure you did not install the toolbox inside the matlab directory or subdirectory !" which toolbox are you refering to?
I am refering to the dsPIC blockset only. The one you download from this website.

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 :
Lubin Kerhuel wrote:rtw_alt_pathname('C:\Program Files\Microchip\MPLAB C30\support\gld')
If you do not get C:\PROGRA~1\MICROC~1\MPLABC~1, you will have to change the short path in Simulink :
Simulation ==> Configuration Parameters ==> Real-Time Workshop ==> DsPIC options
Let me know then...

aunanshi@yahoo.com
Posts: 5
Joined: Sat Jan 19, 2008 5:42 pm

Re: genMakefileAndBuild

Post by aunanshi@yahoo.com » Sat Jan 26, 2008 7:20 am

Hi Lubin,
Compile successful after changed MPLABC~1 to MPLABC~2, all 6 of them from
Simulation ==> Configuration Parameters ==> Real-Time Workshop ==> DsPIC options

Thanks a lot!!!

Regards,
nanshi

bassplayer142
Posts: 4
Joined: Thu Apr 29, 2010 9:03 pm

Re: genMakefileAndBuild

Post by bassplayer142 » Tue May 11, 2010 8:38 pm

I am having the same problem but the previous fix is not working. I'm using the 2007b matlab and have rtw and rtw embedded installed. I get the error as follows

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

It may be important to note that I am running win7 64-bit but I am working with a 32-bit matlab. It is also important to note that my matlab is installed in c:/program files (x86)/... The following is the paths that I have where the problem may lie. Thank you for any help. I also don't know why there is four different path directories for the 5th path (ldlibpic)

(this order below) Gmake file/optimisation/ldflags/ldpictype/ldlibpic/picincludes/picref/compiler path

C:\PROGRA~2\MATLAB\R2007b\bin\win32\gmake

-mcpu=30f4011 -O3 -fschedule-insns -fschedule-insns2

-t --report-mem -Map ../untitled.map --heap 0 -cref

-T C:\PROGRA~2\MICROC~1\MPLABC~2\support\dsPIC30F\gld\p30f4011.gld

C:\PROGRA~2\MICROC~1\MPLABC~2\lib\libpic30-coff.a C:\PROGRA~2\MICROC~1\MPLABC~2\lib\libp30f4011-coff.a C:\PROGRA~2\MICROC~1\MPLABC~2\lib\libc-coff.a C:\PROGRA~2\MICROC~1\MPLABC~2\lib\libm-coff.a

-I C:\PROGRA~2\MICROC~1\MPLABC~2\include

30f4011
''


thanks for any help!

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

Re: genMakefileAndBuild

Post by LubinKerhuel » Wed May 12, 2010 12:33 am

Hi,

try to place the yellow block 'configuration of the model' from the dsPIC library on your model and dbl click on it. It may solve few problems. (anyway, this block will be improved in the next blockset version, not published yet)
If problem is not solved,

Check all your path. Copy-past repertory with ~1 in a file browser to see if that directory exist. If not, try to replace ~1 by ~2 and so on until you find the correct directory.

It should not be a problem to use matlab 32bits on windows 64 bits. I successfully tested this configuration.

Lubin

bassplayer142
Posts: 4
Joined: Thu Apr 29, 2010 9:03 pm

Re: genMakefileAndBuild

Post by bassplayer142 » Wed May 12, 2010 3:59 am

I tried the things you said to no avail. First off whenever I make changes and try them, when I go back to the dsPIC path options, they are all defaulted back to their original paths. Secondly, I checked them and only one is path is broken as seen below.

-T C:\PROGRA~2\MICROC~1\MPLABC~2\support\dsPIC30F\gld\p30f4011.gld

should infact be

-T C:\PROGRA~2\MICROC~1\MPLABC~2\support/gld\p30f4011.gld

I checked with another users comment and tried this command also

rtw_alt_pathname('C:\PROGRA~2\MICROC~1\MPLABC~2\support\gld\')

but in the command window it said this which leads me to believe that is not the problem. It also says this below when I double click the configure model button.

C30 Compiler found
file not found : C:\PROGRA~2\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f4011-coff.a
--> corrected : find in C:\PROGRA~2\MICROC~1\MPLABC~2\lib\libp30f4011-coff.a
Model configured...


Thanks a lot though for the quick reply

edit: I should also note that I only need the hex file which I will then upload to the pickit2. Just wondering if that may simplify the process by getting rid of the c code files.

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

Re: genMakefileAndBuild

Post by LubinKerhuel » Wed May 12, 2010 8:54 pm

Hi,
bassplayer142 wrote:C30 Compiler found
file not found : C:\PROGRA~2\MICROC~1\MPLABC~2\lib\dsPIC30F\libp30f4011-coff.a
--> corrected : find in C:\PROGRA~2\MICROC~1\MPLABC~2\lib\libp30f4011-coff.a
Model configured...
Current version (V3.2b) has a problem here : the path is not updated properly and the error comes back. I'll send an updated verision by email for testing. Let me know if that's Ok.

bassplayer142
Posts: 4
Joined: Thu Apr 29, 2010 9:03 pm

Re: genMakefileAndBuild

Post by bassplayer142 » Wed May 12, 2010 11:13 pm

Unfortunately it still gives the same error. Although the path problem you talked about did disappear. This is what the end of the command prompt says when it errors out.

### Processing Template Makefile: C:\Program Files (x86)\MATLAB\dspic\dspic_pic30_gcc.tmf
-- Bypassing matlab internal LCC configuration --
### Creating try1.mk from C:\Program Files (x86)\MATLAB\dspic\dspic_pic30_gcc.tmf
### Building try1: "C:\PROGRA~2\MATLAB\R2007b\bin\win32\gmake" -f try1.mk GENERATE_REPORT=0 MULTI_INSTANCE_CODE=0 PORTABLE_WORDSIZES=0 GENERATE_ASAP2=0 TMW_EXTMODE_TESTING=0
''pic30-gcc -c -mcpu=30f4011 -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~2\MATLAB\R2007b/simulink/include -IC:\PROGRA~2\MATLAB\R2007b/extern/include -IC:\PROGRA~2\MATLAB\R2007b/rtw/c/src -IC:\PROGRA~2\MATLAB\R2007b/rtw/c/ert -IC:\PROGRA~2\MATLAB\R2007b/rtw/c/src/ext_mode/common -IC:\PROGRA~2\MATLAB\R2007b\try1_dspic\sources -IC:\PROGRA~2\MATLAB\R2007b -IC:\Users\chris\Desktop -IC:\PROGRA~2\MATLAB\R2007b\rtw\c\libsrc -I C:\PROGRA~2\MICROC~1\MPLABC~2\include try1_data.c
''pic30-gcc -c -mcpu=30f4011 -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~2\MATLAB\R2007b/simulink/include -IC:\PROGRA~2\MATLAB\R2007b/extern/include -IC:\PROGRA~2\MATLAB\R2007b/rtw/c/src -IC:\PROGRA~2\MATLAB\R2007b/rtw/c/ert -IC:\PROGRA~2\MATLAB\R2007b/rtw/c/src/ext_mode/common -IC:\PROGRA~2\MATLAB\R2007b\try1_dspic\sources -IC:\PROGRA~2\MATLAB\R2007b -IC:\Users\chris\Desktop -IC:\PROGRA~2\MATLAB\R2007b\rtw\c\libsrc -I C:\PROGRA~2\MICROC~1\MPLABC~2\include try1_main.c
try1_main.c: In function '_FICD':
try1_main.c:41: error: syntax error before '{' token
gmake: *** [try1_main.o] Error 255
### Real-Time Workshop build procedure for model: 'try1' aborted due to an error.
C30 Compiler found
C30 Compiler found


I have also attached the model I was using. thanks!
Attachments
try1.mdl
model
(24.78 KiB) Downloaded 565 times

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

Re: genMakefileAndBuild

Post by LubinKerhuel » Thu May 13, 2010 12:23 pm

Hello,

I could not reproduce that bug.
Thus, it may be your version of the C30 compiler. Which version are you using ? Could you update it with the latest version from the microchip website ?

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests