[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] boot vector address for ATMega32 in datasheet correct
From: |
E. Weddington |
Subject: |
Re: [avr-gcc-list] boot vector address for ATMega32 in datasheet correct ? |
Date: |
Thu, 18 Dec 2003 15:38:21 -0700 |
On 18 Dec 2003 at 11:02, Ewout Boks wrote:
> Erik Christiansen wrote:
> > On Thu, Dec 18, 2003 at 09:45:55AM +0100, Ewout Boks wrote:
> >
> >>I do not understand this, as the ATMega32 has 32K of flash and address
> >>0x37ff is exactly at 16K, ie halfway the application flash of the
> >>ATMega32.
> >
> >
> > Is this a case of the avr using word adressing, and gnu tools remaining
> > with the standard byte addressing? Here is what I did for the mega64,
> > yesterday, for the same purpose:
> >
>
> I do suspect this. In the datasheet on page 253, table 100 the boot size is
> listed in words. The address type is not indicated, though. If using byte
> addressing (like the gnu toolchain) then my question is valid. If word
> addressing is used, then (word *) 0x3800 would be at (byte *)0x7000
> and things are correct.
>
I know this is the case for the mega128. The data sheet lists the WORD
address. You must specify a BYTE address to the GCC toolchain. Just
multiply by 2 and you're there.