> > DECwiz (Fred van Kempen) : > > Further checking revealed, that something else was wrong: I was > > > > using bitfield structures to reference (and initialize) the BCFG2 > > register. A printf() on its contents (both in the GNUARM and IAR > > versions) showed a major difference. I changed that code to just > > ... > > > > So... the bitfield structures don't seem to work with GCC, which I can > > live with now I know it... > > The order how the bits are stored in a bitfield is not defined by standard. > This might be the reason, why gcc writes a different value than IAR. > > -- > 42Bastian Schick No, it is a different (and known) problem. The GCC compiler will use a byte or word16 access to set/clear a small field in the word32: and that will fail on an I/O register that can only be read or written 32 bits at a time. You could do the bitfield operations on a copy in RAM, then write the complete value to the register. Bit me too (pun intended). Arie de Muynck
Message
Re: SOLVED! Re: [lpc2000] GNUARM weirdness ?
2005-07-21 by Arie de Muynck
Attachments
- No local attachments were found for this message.