[fpc-devel] AVR - assembler error when compiling large files

Christo christo.crause at gmail.com
Sat Nov 25 22:19:38 CET 2017

On Sat, 2017-11-25 at 18:27 +0100, Florian Klämpfl wrote:
> What happens if you compile them with -CX?
Same problem.

> >  Is there a way to instruct the compiler to use a larger data type
> > when
> > emitting this information to the assembler file?
> This makes no sense as the program code using this data would not
> know about this.

That was a clue to show I'm in unfamiliar territory.

I experienced the problem when using the supplied make file to build an
AVR RTL.  When I compiled the unit by hand, it worked.  I then noticed
that the problem seems to be related to the -g option.  If I compile
the large unit with -gw3 it was fine but when I compile the large unit
with -g it gave the "Error: value of 65611 too large for field of 2
bytes at 65609" type errors.

I tried passing OPT=-gw3 to make, but then the system unit cannot
compile. Unfortunately this means I cannot use the current makefile to
compile AVR RTL with large unit files.

More information about the fpc-devel mailing list