[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] internal error: out of range error

From: Erik Christiansen
Subject: Re: [avr-gcc-list] internal error: out of range error
Date: Mon, 6 Sep 2004 14:35:20 +1000
User-agent: Mutt/1.3.28i

On Thu, Sep 02, 2004 at 09:45:35PM +0300, Dafni & Robert Berger wrote:
> I am hitting the famous "out of range error", cause by an odd number of data
> bytes inserted in the .text section.
> This innocent line of code, which tries to put some version info into ROM
> causes the error:
> const char      max7219_C_VER[] PROGMEM = "@(#) $Id: max7219.c,v 0.0
> 2004/01/25 18:58:09Dafni Exp $";

Well, there appear to be 55 bytes in the string before running ident. If
you're starting on an even byte address, you'd expect that (infamously
imprecise) error message.

> I am searching for the correct way to use __attribute__ ((aligned
> (something))) to heal the problem.

Unfortunately I only have experience with fixing this in assembler.
For an interim solution, how about in-lining the standard assembler fix:

   .align 1

Since gnu for avr uses 2^n notation, in contrast to the same tools for
some other targets, that'll give you even alignment.

Wait, this is untried, but what about:

const char  max7219_C_VER[] __attribute__ ((aligned (16), __progmem__))
= "@(#) $Id: max7219.c,v 0.0 2004/01/25 18:58:09Dafni Exp $";


reply via email to

[Prev in Thread] Current Thread [Next in Thread]