Memory problem overflow in segment

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Memory problem overflow in segment

Jump to solution
1,222 Views
iamarcoia
Contributor II

hello to everybody,

i'm trying to complete my project over a MC56f8006 DSC I'm using CW MCU 10.6 eclipse IDE.

I'm using some resources like:

1 PC_master with sci interface

1 timer

1 ADC

1 PWMMC

and the Component: MC1 of type MC_WaveGenerate

Description: Motor Control 3-Phase Wave Generation

 

I'm trying to realize a 3-phase sinusoidals waves with this magic bean as stated in MC_WaveGenerate help page.

 

when I build I have this:

 

Description    Resource    Path    Location    Type

Overflow in segment: .x_Data from section: .ApplicationData Segment reserved byte size is: 0x000007fe -- Overflow of: 0x000001f0 bytes    prova1             C/C++ Problem

 

i think that I have occupated too much of memory.

 

Where can i find a way to fix this?

how is related the stack and the heap memory to this problem?

if i reduce the minimal size of the system stack the program build and run but freemaster didn't comunicate with the DSP.

How can I use the flash memory ? someone can help me?

 

Thanks.

Labels (1)
0 Kudos
1 Solution
788 Views
ankur_vcns_apps
NXP Employee
NXP Employee

Hi,

The memory segment overflow can be overcome with either of the following:

1) try and disable the FreeMaster Recorder. You can use the scope for debugging. this would help save some memory. you can also try by reducing the buffer size of the recorder.

2) reduce the size of Look-up table for sine wave generation.

3) try and redcue as many constants from your code as possible. If arrays with constant values are used, try using alternate means.

View solution in original post

0 Kudos
2 Replies
789 Views
ankur_vcns_apps
NXP Employee
NXP Employee

Hi,

The memory segment overflow can be overcome with either of the following:

1) try and disable the FreeMaster Recorder. You can use the scope for debugging. this would help save some memory. you can also try by reducing the buffer size of the recorder.

2) reduce the size of Look-up table for sine wave generation.

3) try and redcue as many constants from your code as possible. If arrays with constant values are used, try using alternate means.

0 Kudos
788 Views
iamarcoia
Contributor II

Hi Ankur,

Thank You for the reply, I solve calculating the value at every step without using the LUT.

I'm interested in your 2nd solution How can I reduce the length of the LUT? Seems to be predefined.

#define SINE_TABLE_LENGTH 8

in MC1.h

bye

0 Kudos