[Icc-avr] Casting

Michael Dipperstein MDipperstein at CalAmp.com
Tue Jan 15 13:53:49 PST 2008


I've been evaluating a few MCUs and the CodeWarrior compiler for
Motorola (oops.. Freescale) HCS08 parts defaults to big endian.  ICC AVR
is little endian.  Porting some of the endian specific code that was
talked about in this thread from one processor to another isn't as
simple as storing and retrieving using the same methods on both
processors.

-Mike

-----Original Message-----
From: icc-avr-bounces at imagecraft.com
[mailto:icc-avr-bounces at imagecraft.com] On Behalf Of Albert vanVeen
Sent: Tuesday, January 15, 2008 11:11 AM
To: Discussion list for ICCAVR and ICCtiny Users. You do NOT
needtosubscribeto icc-announce if you are a member of this.
Subject: RE: [Icc-avr] Casting

I think there has been too much emphasis on the endians in this thread.
Nearly always these conversions are wanted for storage in byte-arrays or
comms buffers, and as long as storing and retrieving uses the same
method (and a few were mentioned here!) it doesn't matter where msb or
lsb is. Using Motorola (oops.. Freescale), TMS, PIC & AVR, I haven't
stumbled over it yet.
I hope this doesn't upset Ton's "There is no excuse for sloppy
programming." in which he is perfectly correct of course.

Albert.



More information about the Icc-avr mailing list