problem with master and ADC block

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

problem with master and ADC block

Post by crh » Thu Dec 18, 2008 11:36 am

Hello Lubin,
I started some time ago with microcontrollers.
I rebuild your first model with the compare block and compiled it. No problems.
Now, I try to compile a model with a master block and an ADC block.
In the error screen I received the following message:

Code: Select all

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

And in the Matlab workspace at the end:
BCwithBPfilter.o: Link Error: Could not allocate section .nbss, size = 13522 bytes, attributes = bss near  Link Error: Could not allocate data memory gmake: *** [..\../BCwithBPfilter.coff] Error 255 
### Real-Time Workshop build procedure for model: 'BCwithBPfilter' aborted due to an error.
C30 Compiler found
I suppose there are some mismatches in the settings of the block parameters. I tried to attach the mdl file, but I received the message: size too big.
Kind regards, Casparus

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

Re: problem with master and ADC block

Post by LubinKerhuel » Thu Dec 18, 2008 1:49 pm

Hi Casparus,

I just increased the max upload size from 256Ko to 2 Mo. You shoudl be able to upload your file now.

If you just have an ADC block with a Master block, there is a problem !

I guess that you implement a filter. If you are using a FIR filter, you may have too many coefficients.
go to Configuration ==> options parameters ==> Optimization == > check "inline paramemters". That may uses less RAM memory.

Lubin

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

Re: problem with master and ADC block

Post by crh » Thu Dec 18, 2008 4:15 pm

Hello Lubin,
I cannot believe myself, but now I managed to compile. But the process takes an extreme long time. I do not know if this is a normal situation for models with a filter.
I uploaded my model in the attachment.
I am very busy to study the filters. So far, as I understand fixed filters are using less space. But, I still wonder if there are some common problems (with the use of an ADC and gain block)to implement them in dsPic30F43013.
For fewer coefficients I already checked the box: inline parameters. I did this already yesterday. For this, I used the model adviser, a very useful and easy tool.
Kind regards, Casparus
Attachments
BCwithBPfloat1.mdl
(777.02 KiB) Downloaded 232 times

malife
Expert
Posts: 56
Joined: Tue Apr 17, 2007 7:24 am
Location: Santa Cruz, CA
Contact:

Re: problem with master and ADC block

Post by malife » Sun Jan 11, 2009 6:58 am

Hello All,
This problem, which really is not a problem but a compiler feature is related with near and far code (data and code) take a look at the C30 compiler documentation so you can set the flags accordingly in the compiler settings in matlab. I've been through this error before.

Regarding the long compilation time, if you are using dsp blocks in matlab the first time you compile takes a very long time since it is generating object files for many functions even if you do not use them directly. The second time around should be much faster. If not you might have some setting wrong.

Hope this helps.

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

Re: problem with master and ADC block

Post by crh » Thu Jan 15, 2009 8:32 am

Hello Lubin,

Everything is clear now. Thanks for your help,

regards, Casparus

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest