[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for X
From: |
Weddington, Eric |
Subject: |
Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB. |
Date: |
Mon, 19 Nov 2012 16:00:06 +0000 |
> -----Original Message-----
> From: Weddington, Eric
> Sent: Monday, November 19, 2012 8:58 AM
> To: Thomas, George; address@hidden
> Subject: RE: [avr-gcc-list] Align attribute in gcc requiring alignment of 2
> for Xmegas with USB.
>
> > Section 20.13.7 of the Xmega manual speaks about the requirement of 16
> bit
> > alignment.
> >
> > http://www.atmel.com/images/doc8331.pdf
> >
> > As the MAXIMUM_ALIGNMENT in avr.h is set to 1, it throws an error when
> > trying to compile.
> >
> > I have attached a patch which sets it to 2 by default in the compiler.
> > I have also attached a case which fails.
> >
> > Would this be an acceptable change ?
>
> Hi George,
>
> No, this would not be an acceptable change, because it is changing the data
> alignment for the whole compiler, when there is only a restriction on a
> data structure for a single peripheral for a small subset of the AVR
> processors.
>
> This is why the data attribute "aligned" exists. Just do this for your data
> structure:
> __attribute__ ((aligned (2)))
>
Excuse me, perhaps I have this wrong... (It's still early for me).
Does changing MAXIMUM_ALIGNMENT allow the aligned attribute to work? If we
don't change MAXIMUM_ALIGNMENT, are you saying that the aligned attribute fails?
If so, then YES, I would be open to a change that allows it to work...
Eric
- [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Thomas, George, 2012/11/19
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Georg-Johann Lay, 2012/11/19
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Weddington, Eric, 2012/11/19
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB.,
Weddington, Eric <=
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Georg-Johann Lay, 2012/11/19
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Thomas, George, 2012/11/19
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Thomas, George, 2012/11/21
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Georg-Johann Lay, 2012/11/21
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., David Brown, 2012/11/22
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., Georg-Johann Lay, 2012/11/22
- Re: [avr-gcc-list] Align attribute in gcc requiring alignment of 2 for Xmegas with USB., David Brown, 2012/11/22