[avr-gcc-list] GCC platform specific identification?

2007-07-31 Thread Schwichtenberg, Knut
Hi, is there a cpp-macro / definition to distiguish between the different gcc platform implementations? I read the cpp-man describing __xxx__ macros like __GNUC__ and did not find any. But there may be one not officially documented. At least I want to know within my source code if the file is

Re: [avr-gcc-list] GCC platform specific identification?

2007-07-31 Thread Julius Luukko
On Tuesday 31 July 2007, Schwichtenberg, Knut wrote: Hi, is there a cpp-macro / definition to distiguish between the different gcc platform implementations? I read the cpp-man describing __xxx__ macros like __GNUC__ and did not find any. But there may be one not officially documented. At

RE: [avr-gcc-list] Assembly language help

2007-07-31 Thread Eric Weddington
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Parthasaradhi Nayani Sent: Monday, July 30, 2007 9:40 PM To: Erik Christiansen; avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] Assembly language help Hello Erik, Erik Christiansen

RE: [avr-gcc-list] GCC platform specific identification?

2007-07-31 Thread Schwichtenberg, Knut
Julius, thanks for your reply. That's what I'm looking for. For the current version of WinAVR the important results are: $ ./avr-cpp -dM NUL | grep AVR #define __AVR_2_BYTE_PC__ 1 #define __AVR_ARCH__ 2 #define __VERSION__ 4.1.2 (WinAVR 20070525) #define __AVR 1 #define AVR 1 #define __AVR__ 1

Re: [avr-gcc-list] Strange problem - Pointer not null when declared

2007-07-31 Thread Joerg Wunsch
Colin Paul Gloster [EMAIL PROTECTED] wrote: C does not guarantee an initial value for something which is declared without a definition. First, you are obviously confusing definition with initializer. Second, this is wrong: all objects with static storage (i.e. everything explicitly declared

Re: [avr-gcc-list] GCC platform specific identification?

2007-07-31 Thread Joerg Wunsch
Schwichtenberg, Knut [EMAIL PROTECTED] wrote: For my purpose this is okay, but as far as I thought the __xxx__ defines should be only used/provided by the compiler and here the obvious AVR is used which I thought is part of the user name space. I think that AVR macro goes away with some of

Re: [avr-gcc-list] Assembly language help

2007-07-31 Thread Joerg Wunsch
Eric Weddington [EMAIL PROTECTED] wrote: IIRC, these modifiers (lo8, hi8, pm_lo8, pm_hi8, others) are somewhat documented in the avr-libc user manual in the FAQ. We documented them there because binutils has long been lacking documentation for the AVR-specific stuff. Fortunately, that has

Re: [avr-gcc-list] Strange problem - Pointer not null when declared

2007-07-31 Thread Gerard Marull Paretas
Thanks for the explanation Joerg. Gerard. ___ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Re: [avr-gcc-list] Optimiser bloats code

2007-07-31 Thread Dave Hylands
Hi Wouter, I also noted that on all functions r25 is cleared, but the value is returned in r24, right? I am returning an 8 bit value, not a 16 bit? What's going on? Return values are promoted to an int. You probably already know this, but you could also do: return PINB 5; which returns the