IAR EW430 error message

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi there,
Does anyone knows following error?
and how can cope it?

-----------------------------------------------------------------
Error[e16]: Segment DATA16_I (size: 0x404 align: 0x1) is too long for
segment definition. At least 0x3 more bytes needed.
The problem occurred while processing the segment placement command
"-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,HEAP+_HEAP_SIZE02%00-0600", where
at the moment of placement the
available memory ranges were "CODE:200-600"
   Reserved ranges relevant to this placement:
   200-600              DATA16_I
------------------------------------------------------------------

I have some data tables with in my program memory and as I want to
reach the data using arrays I face this error.

Many thanks,

Amir


Re: IAR EW430 error message
snipped-for-privacy@gmail.com says...
Quoted text here. Click to load it

You are asking the compiler to allocate 0x404 bytes from the heap which
is only 0x400 bytes deep.

How did you declare the data tables?

--Gene

Re: IAR EW430 error message
Hi Gene,
I defined some arrays like:
unsigned short int Array[x][y] = ,,.....};
and as the size of these tables increased they fell outside a segment.
But I think compiler should manage all these; besides, I increased heap
and stack size in projects option but there was no effect.
I will appreciate to have your comment (or anyone who could give me
some hints).
Thanx
Amir


Re: IAR EW430 error message
Quoted text here. Click to load it

If the arrays are constant zou should declare them with "const" keyword.
Also, read the compiler docs and chck the possible syntax for forcing
constants into code section (some #pragma?)

Quoted text here. Click to load it

The compiler cannot guess that an object declared as variable is in fact
constant that could be placed in ROM.

Re: IAR EW430 error message
Many thanks,
The problem was because of code and data memory.
Funny mistake!
by changing
array[x][y];
to
const int array[x][y];
the data resides in code memory.
Cheers,
Amir

Grzegorz Mazur wrote:
Quoted text here. Click to load it


Re: IAR EW430 error message

Quoted text here. Click to load it

A question about this error message comes up, either here or on the
MSP430 newsgroup, every other week and is always down to the fact that
the author has not grasped the fact that their processor has a vey
limited RAM resource.  This  time the over definition of RAM was quite
mild - some of the posters get quite upset when they find out that
their 2K of RAM cannot hold a megabyte buffer.

This error message is actually from the linker not the compiler.  It is
only at the link stage that you actually tell the tools precisely which
processor vvariant you are targetting and hence define the memory map.
The compiler has no idea whether you are working with 128 bytes or
10kbytes of RAM.

Any const data will be stored in FLASH automatically, no need to use
any #pragmas.

Increasing the heap or stack sizes declared in the tools cannot
increase the amount of RAM that TI have built into the chip and as
there is no external bus, the scope for adding more is somewhat
limited.

Ian


Site Timeline