error building your model Hypersampling

Create new topics, add your comment, remark, bugs...
Post Reply
crh
Posts: 20
Joined: Wed Oct 29, 2008 11:51 am

error building your model Hypersampling

Post by crh » Sun Jul 12, 2009 4:41 pm

Hello Lubin,
This is the first time that I try to build a model with a PIC32. Till now without any succes and a lot of errors.
When I try to build your model hypersampling I get the next error:

In file included from dsPIC_32MX460F512L_Explorer16_HyperSampling_main.c:28:
dsPIC_32MX460F512L_Explorer16_HyperSampling_private.h:33:19: timer.h: No such file or directory
dsPIC_32MX460F512L_Explorer16_HyperSampling_private.h:37:24: outcompare.h: No such file or directory
gmake: *** [dsPIC_32MX460F512L_Explorer16_HyperSampling_main.o] Error 1
### Real-Time Workshop build procedure for model: 'dsPIC_32MX460F512L_Explorer16_HyperSampling' aborted due to an error.
C32 Compiler found

When I try to build my model I get the next error:

C:\Users\Casparus\Documents\MATLAB\Work Pic32\ADC filter OC HW Pic32\ADC_forumkerhuel_OC_HW_Fs30k_PIC32_dspic\sources>"C:\PROGRA~1\MATLAB\R2008b\bin\win32\gmake" -f ADC_forumkerhuel_OC_HW_Fs30k_PIC32.mk GENERATE_REPORT=0 MULTI_INSTANCE_CODE=0 PORTABLE_WORDSIZES=0 GENERATE_ASAP2=0 TMW_EXTMODE_TESTING=0
C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\bin\\pic32-gcc -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2008b/simulink/include -IC:\PROGRA~1\MATLAB\R2008b/extern/include -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/src -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/src/ext_mode/common -IC:\Users\Casparus\DOCUME~1\MATLAB\WORKPI~1\ADCFIL~1\ADC_FO~1\sources -IC:\Users\Casparus\DOCUME~1\MATLAB\WORKPI~1\ADCFIL~1 -IC:\PROGRA~1\MICROC~1\MPLABC~1\pic32mx\include -IC:\PROGRA~1\MICROC~1\MPLABC~1\pic32mx\include\peripheral ADC_forumkerhuel_OC_HW_Fs30k_PIC32_data.c
process_begin: CreateProcess(NULL, C:\PROGRA~1\MICROC~1\MPLABC~1\bin\pic32-gcc -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2008b/simulink/include -IC:\PROGRA~1\MATLAB\R2008b/extern/include -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/src -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/src/ext_mode/common -IC:\Users\Casparus\DOCUME~1\MATLAB\WORKPI~1\ADCFIL~1\ADC_FO~1\sources -IC:\Users\Casparus\DOCUME~1\MATLAB\WORKPI~1\ADCFIL~1 -IC:\PROGRA~1\MICROC~1\MPLABC~1\pic32mx\include -IC:\PROGRA~1\MICROC~1\MPLABC~1\pic32mx\include\peripheral ADC_forumkerhuel_OC_HW_Fs30k_PIC32_data.c, ...) failed.

make (e=2): Het systeem kan het opgegeven bestand niet vinden. (in English: the system cannot find the file)
gmake: *** [ADC_forumkerhuel_OC_HW_Fs30k_PIC32_data.o] Error 2
### Real-Time Workshop build procedure for model: 'ADC_forumkerhuel_OC_HW_Fs30k_PIC32' aborted due to an error.
C32 Compiler found

My idea is that there must be somewhere a fundamental mistake, but I do not know where to look.

Casparus
Attachments
ADC_forumkerhuel_OC_HW_Fs30k_PIC32.mdl
(28.15 KiB) Downloaded 454 times
dsPIC_32MX460F512L_Explorer16_HyperSampling.mdl
(30.47 KiB) Downloaded 529 times

crh
Posts: 20
Joined: Wed Oct 29, 2008 11:51 am

Re: error building your model Hypersampling

Post by crh » Mon Jul 13, 2009 3:16 pm

Hello Lubin,
I solved my problem by re-installing the C30 and C32 compilers again.
No problems anymore with your model Hypersampling.
But with the attached model (with any kind of filter), I get the following message (without a filter no problems):

C:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\dspblks\c\dsppinv/pinv_d_rt.c: In function `MWDSP_PINV_D':
C:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\dspblks\c\dsppinv/pinv_d_rt.c:66: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://support.microchip.com> for instructions.
gmake: *** [pinv_d_rt.o] Error 1
### Real-Time Workshop build procedure for model: 'ADC_forumkerhuel_OC_HW_Fs30k_PIC32' aborted due to an error.
C32 Compiler found

Casparus
Attachments
ADC_forumkerhuel_OC_HW_Fs30k_PIC32.mdl
(51.1 KiB) Downloaded 500 times

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

Re: error building your model Hypersampling

Post by LubinKerhuel » Mon Jul 13, 2009 10:45 pm

Hi Casparus,

I open the model (with matlab 2009a) and compile it without problems.
I attached the .hex file generated.

I was wondering if the time-step is not to fast. at 30Khz, it would be better to use fixed point filter. You may considere using the busy flag port (see master block options)

It seems that the error you get comes from the C compiler. It's is strange as I am using the same C compiler (I use the last version of C32) :

Code: Select all

>> !pic30-gcc -v
gcc version 4.0.3 (dsPIC30, Microchip v3_11) Build date: Jul 16 2008 
Microchip Language Tool Shell Version v3_11 (Build date: Jul 16 2008). 
Lubin
Attachments
ADC_forumkerhuel_OC_HW_Fs30k_PIC32.hex
(37.88 KiB) Downloaded 451 times

crh
Posts: 20
Joined: Wed Oct 29, 2008 11:51 am

Re: error building your model Hypersampling

Post by crh » Tue Jul 14, 2009 9:49 am

Hello Lubin,
I followed your advises and tried to eliminate every possible fact that could cause an error. I even re-installed the C32 compiler (and a fixed point fillter).
But always the same error appears:
''pic32-gcc -c -mprocessor=32MX460F512L -O3 -fschedule-insns -fschedule-insns2 -O -I. -I..\.. -IC:\PROGRA~1\MATLAB\R2008b/simulink/include -IC:\PROGRA~1\MATLAB\R2008b/extern/include -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/src -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/ert -IC:\PROGRA~1\MATLAB\R2008b/rtw/c/src/ext_mode/common -IC:\Users\Casparus\DOCUME~1\MATLAB\WORKPI~1\ADCFIL~1\ADCFOR~1\ADC_FO~1\sources -IC:\Users\Casparus\DOCUME~1\MATLAB\WORKPI~1\ADCFIL~1\ADCFOR~1 -IC:\PROGRA~1\MATLAB\R2008b\toolbox\dspblks\include -IC:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\dspblks\c -IC:\PROGRA~1\MICROC~1\MPLABC~2\pic32mx\include -IC:\PROGRA~1\MICROC~1\MPLABC~2\pic32mx\include\peripheral C:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\dspblks\c\dsppinv/pinv_d_rt.c
C:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\dspblks\c\dsppinv/pinv_d_rt.c: In function `MWDSP_PINV_D':
C:\PROGRA~1\MATLAB\R2008b\toolbox\rtw\dspblks\c\dsppinv/pinv_d_rt.c:66: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://support.microchip.com> for instructions.
gmake: *** [pinv_d_rt.o] Error 1
### Real-Time Workshop build procedure for model: 'ADC_forumkerhuel_OC_HW_Fs3k_PIC32' aborted due to an error.
C32 Compiler found

I use the latest evaluation C32 V 1.05 and Matlab 2008b.
Without a filter I can build the model.

Casparus
Attachments
ADC_withoutfilter_OC_HW_Fs3k_PIC32.mdl
(51.06 KiB) Downloaded 445 times
ADC_forumkerhuel_OC_HW_Fs3k_PIC32.mdl
(51.06 KiB) Downloaded 443 times

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

Re: error building your model Hypersampling

Post by LubinKerhuel » Tue Jul 14, 2009 10:04 am

Hi Casparus,

I tested the model with matlab 2008b and I get the same error.
It seems that matlab 2008b generate code that make the compiler to bug. I do not have solution for that.

As the problem is due to the filter block fdatool, you may easily find a workaround : from the fdatool, generate a simulink subsystem with the filter implemented with simple elements , i.e. addition, delay and gain. This should work.

Lubin

Post Reply

Who is online

Users browsing this forum: No registered users and 33 guests