[Top][All Lists]

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

Re: [avr-gcc-list] Padding problem with "progmem"

From: Larry Barello
Subject: Re: [avr-gcc-list] Padding problem with "progmem"
Date: Sun, 5 Aug 2001 07:48:15 -0700

In assembly you need to tell the assembler:

    .balign 2

If you are declaring the string in C, the resulting code should
already be aligned.  Here is a fragment from my code (20010606 v3.0

#define FLASH __attribute__ ((progmem))
static char FLASH stX[]     = "X:";

and the resulting asm (avr-gcc -S)

 .stabs "stX:S(0,24)=ar(0,23);0;2;(0,2)",38,0,18,stX
 .type stX,@object
 .size stX,3
 .string "X:"

---- Original Message -----
From: "Christoph Plattner" <address@hidden>
To: <address@hidden>; <address@hidden>
Sent: Sunday, August 05, 2001 4:03 AM
Subject: [avr-gcc-list] Padding problem with "progmem"

> If the string has an even length, everything works ok.
> I now the reason (16bit code access, single characters of 8
> bit). But is it not possible to include a padding here, to
> start and stop every string on an even address, although we
> loose perhaps some bytes, if often single charaters are used.
> Is there a workaround for that problen, like a
> __asm__ __volatile__ (".align 2");

reply via email to

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