avr-gcc-list
[Top][All Lists]
Advanced

[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: Ewout Boks
Subject: Re: [avr-gcc-list] boot vector address for ATMega32 in datasheet correct ?
Date: Thu, 18 Dec 2003 11:02:14 +0100
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031109

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.



Merry Christmas and a good holiday!

Ewout


MEMORY
{ text (rx) : ORIGIN = 0, LENGTH = 62K
  boot   (rx)   : ORIGIN = 62K, LENGTH = 2K
  data   (rw!x) : ORIGIN = 0x800100, LENGTH = 4K
  eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 2K
}

...

  .boot :
  {
    *(.boot_vectors)
    *(.boot)
  } > boot

The length of the boot (flash) sector is 1K words, so we set 2K bytes.

Sorry if this is short, but my Christmas holiday started some hours ago,
and I'm still chained to the desk.

Erik





reply via email to

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