ARM Technical Support Knowledge Articles

SMALL PROGRAM DOES NOT FIT INTO MEMORY

Applies to: C166 C Compiler

Answer


Information in this article applies to:


QUESTION

I have just started with a small test program on a C164 device which looks like:

#include <reg164.h>
int bdata Result;
void main (void)  {
  ;
}

However, I cannot build this project. I get linker errors:

*** ERROR L114: SECTION DOES NOT FIT WITHIN SEGMENT BOUNDARY
    SECTION: ?BD0?BLINKY
    CLASS:   BDATA0

*** ERROR L107: CLASS ADDRESS RANGE OVERFLOW
    SECTION: ?BD0?BLINKY
    CLASS:   BDATA0

What is wrong and how can I fix this problem.

ANSWER

The linker messages indicate that you do not have space for placing the BDATA0 memory class and therefore the bdata variable cannot be allocated to memory. Details of the memory allocation can be found in the linker map file (*.M66).

The C164 design that you are working on is most likely just a single chip device without off-chip RAM. Therefore it might be necessary that you adjust the stack sizes in the STARTUP file (typically START167.A66). Therefore reduce the settings for System Stack (STKSZ) and User Stack (USTSZ) in this startup file.

You should also check, if the on-chip XRAM is enabled in both the STARTUP file (setting XPEN) and the µVision2 IDE (under Project — Options for Target — Target).

MORE INFORMATION

SEE ALSO

Article last edited on: 2006-10-24 14:34:26

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential