[Top][All Lists]

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

Re: [avr-gcc-list] Syntax: Function pointer hell... newbee lost ! ; -)

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Syntax: Function pointer hell... newbee lost ! ; -)
Date: Tue, 20 Jan 2009 22:33:49 +0100 (MET)

Dave N6NZ <address@hidden> wrote:

> Well, avr-gcc thinks the whole world is byte addressable.

Rather: the GNU tools simply use byte addressing, regardless of
whether the target address space alignment is 1-byte, 2-byte, 4-byte,
or 8-byte.  Many RISC CPUs used to require 32-bit aligned access
already 15 years ago, yet their tools always use byte addressing.

The AVR case is particularly funny since while the flash ROM is
described as being addressed in entities of 16 bits, the LPM
instruction in turn addresses it in units of 8 bits, so there's no
such thing as a "flash address" in the AVR Tools, but you have to ask
back whether this flash address is meant for instruction or data
access in order to know which datum it is addressing...  (Also,
there's an assymetry between the LPM and SPM instructions here, you
need two LPMs in order to read back the result of one SPM.)

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]