Page 1 of 1

dspic building error - solved

Posted: Wed Aug 13, 2008 9:35 pm
by JacquesKleynhans
Hi i bought my Expl 16 dev kit this morning but have a few problems building the sim blocks examples provided.
I am using Matlab 2007b and also installed the embedded toolbox for 2007b"Super great toolbox"

My problem is

Code: Select all

Error building Real-Time Workshop target for block diagram 'dsPIC_33f_Explorer16'. MATLAB error message:
Error using ==> rtw_create_directory_path at 26
Error creating directory 'C:\Program Files\MATLAB\R2007b\My Work\slprj' : The directory or file cannot be created.


Something dodge is going on. I am very new to matlab so solving it myself, dont even ask!! I copied the .hex file and programed it to the board with mplab
and used the rs232 gui" not the one in the sim example" but actually typing "rs232gui in the gui of matlab and this works fine.

I am just struggeling with the building and compliing in matlab.

Any Help greatly appreciated

Kind Regards
Jacques Kleynhans

Re: dspic building error

Posted: Wed Aug 13, 2008 11:17 pm
by LubinKerhuel
Hi Jacques,

I did not encounter such a bug where matlab cannot create a directory.
You should avoid working in the c:\program file\... directory!
Try copy your working file somewhere else and try again.

If it does not work, you could try to create the slprj directory from the matlab prompt : >>mkdir slprj

It is not clear if you manage to compile the provided example for the explorer 16 board.
If it did not compile, how did you generates the .hex file? Did you use one .hex taken from the website?

Regards
Lubin

Re: dspic building error

Posted: Thu Aug 14, 2008 12:08 pm
by JacquesKleynhans
Ok i moved my working to file to another place that seemed to solve the building error. Thanks!!

But now when i compile i get a long list of good news and a short one of bad

Code: Select all

"### Creating rtwlib.a "
C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\bin\\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"
C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\bin\\pic30-ld   -t --report-mem -Map ../untitled.map --heap 0  -cref -T C:\PROGRA~1\MICROC~1\MPLABC~2\support\dsPIC33F\gld\p33fJ256GP710.gld -o ..\../dsPIC_33f_Explorer16.coff  dsPIC_33f_Explorer16_main.o dsPIC_Multiplexed_out_UART2.o dsPIC_UART2_Interrupt.o dsPIC_33f_Explorer16.o     rtwlib.a  C:\PROGRA~1\MICROC~1\MPLABC~2\lib\libpic30-coff.a  C:\PROGRA~1\MICROC~1\MPLABC~2\lib\dsPIC33F\libp33fJ256GP710-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:\PROGRA~1\MICROC~1\MPLABC~2\bin\pic30-coff-ld: cannot open linker script file C:\PROGRA~1\MICROC~1\MPLABC~2\support\dsPIC33F\gld\p33fJ256GP710.gld: No such file or directory
gmake: *** [..\../dsPIC_33f_Explorer16.coff] Error 255
### Real-Time Workshop build procedure for model: 'dsPIC_33f_Explorer16' aborted due to an error.
C30 Compiler found
C30 Compiler found
C30 Compiler found
C30 Compiler found
Model configured...


Oya and that hex file i got from http://www.kerhuel.eu/wiki/Explorer_16_Board

Thanks
Jacques Kleynhans

Re: dspic building error

Posted: Thu Aug 14, 2008 6:21 pm
by LubinKerhuel
- Please Check that you are using the C30 compiler version 3.10 or above.

Then, you could find the .gld file required, copy it into the root directory c:\
On your simulink model, go to:
Simulation ==> Configuration Parameters ==> DsPIC Options
Change the line LDPICTYPE from
-T C:\PROGRA~1\MICROC~1\MPLABC~1\support\dsPIC30F\gld\p30f3012.gld
to -T C:\p30f3012.gld
And Compile!

Matab should find the file with such a simple path!

You may find useful information on others topics :
viewtopic.php?f=4&t=116

Let know if you still get the problem.

Re: dspic building error

Posted: Thu Aug 14, 2008 11:39 pm
by JacquesKleynhans
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D Great Support Everything works i updated my compiler :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

Kind Regards
Jacques Kleynhans