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: Joerg Wunsch
Subject: Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000
Date: Fri, 16 Dec 2011 22:04:48 +0100 (MET)

"Weddington, Eric" <address@hidden> wrote:

> 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.

Even more confusing then, while the SPM instruction operates on 16-bit
words (to program the flash), the LPM instruction operates on 8-bit
bytes, as all of a sudden, with LPM, the flash becomes byte-oriented.
=:-)

Manufacturers of 32-bit CPUs usually always talk about byte when
dealing with addresses, and simply require that the two LSBs of the
address are 0.  Or, as with ARM, the address alignment is 16 bits, and
the LSB is used to encode the thumb bit (so while in thumb mode, the
PC always displays in odd numbers).

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

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