> -----Original Message----- > From: [email protected] [mailto:avr- > [email protected]] On Behalf Of Mitch > Davis > Sent: Wednesday, December 14, 2011 1:47 AM > To: Klaus Rudolph > Cc: [email protected] > Subject: Re: [avr-chat] debugging gdb/ddd: wrong assembler output > withoffset 0x800000 > > Another thing to watch out for: Sometimes with the AVR, addresses are > in terms of bytes, and sometimes in terms of 16-bit words. Sometimes > you have to guess which one the GNU toolchain wants.
For the most part, the GNU toolchain deals in bytes. Where it gets most confusing is with the bootloader area. The Atmel datasheets describe the bootloader area and addresses in terms of words; this means that the addresses are addresses-to-words, which means that they are half the value of a typical address-to-byte. The reason why the datasheet is this way is because the Flash is programmed (via the bootloader) in word values. This is also talked about in the avr-libc user manual in the bootloader API section. That's the most common mixup. Usually, everything else is pretty clear. Eric _______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
