avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x80


From: Weddington, Eric
Subject: Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000
Date: Wed, 14 Dec 2011 17:07:05 -0700


> -----Original Message-----
> From: address@hidden
[mailto:avr-
> address@hidden On Behalf Of Mitch
> Davis
> Sent: Wednesday, December 14, 2011 1:47 AM
> To: Klaus Rudolph
> Cc: address@hidden
> 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



reply via email to

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