Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | AVRclub | [AVR club] AVR GCC - Commands/Marco List?

Atmel AVR Microcontroller discussion group.

[AVR club] AVR GCC - Commands/Marco List? - Rakesh Kumar - Jun 16 6:03:34 2007

Hello all,

I am looking for a list of Commands/Macros which are available in AVR GCC
documented at one place. I looked around at the google but couldn't find
anything significant. Do you know any web-links or have anything, please do
send it to the group or upload in the files section.

--
Rakesh.
http://gopchandani.wordpress.com
[Non-text portions of this message have been removed]


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )


Re: [AVR club] AVR GCC - Commands/Marco List? - Dave Hylands - Jun 16 10:45:54 2007

Hi Rakesh,

> I am looking for a list of Commands/Macros which are available in AVR GCC
> documented at one place. I looked around at the google but couldn't find
> anything significant. Do you know any web-links or have anything, please do
> send it to the group or upload in the files section.

If you execute the following commands:

touch empty.c
avr-gcc -E -Wp,-dD,-dM empty.c

this will print out a list of all of the builtin macros along with
their values. If you replace empty.c with a real source file, then it
will print out all of the macros in effect by the end of the source
file.

Note that "-Wp,-dD,-dM" is one option with no spaces after any of the commas.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] AVR GCC - Commands/Marco List? - Rakesh Kumar - Jun 16 12:08:11 2007

Hey Dave,

Thanks a lot for the promising and prompt reply.

However, I don't really get the context of where to execute these commands.
I use AVR-GCC (WinAVR) in the AVR Studio on my Windows XP machine. Can you
guide me a with little background on these commands and if possible, how
execute them in my environment.

On 6/16/07, Dave Hylands wrote:
>
> Hi Rakesh,
>
> > I am looking for a list of Commands/Macros which are available in AVR
> GCC
> > documented at one place. I looked around at the google but couldn't find
> > anything significant. Do you know any web-links or have anything, please
> do
> > send it to the group or upload in the files section.
>
> If you execute the following commands:
>
> touch empty.c
> avr-gcc -E -Wp,-dD,-dM empty.c
>
> this will print out a list of all of the builtin macros along with
> their values. If you replace empty.c with a real source file, then it
> will print out all of the macros in effect by the end of the source
> file.
>
> Note that "-Wp,-dD,-dM" is one option with no spaces after any of the
> commas.
>
> --
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.com/
>
>

--
Rakesh.
http://gopchandani.wordpress.com
[Non-text portions of this message have been removed]


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] AVR GCC - Commands/Marco List? - Dave Hylands - Jun 16 14:04:49 2007

Hi Rakesh,

> However, I don't really get the context of where to execute these commands.
> I use AVR-GCC (WinAVR) in the AVR Studio on my Windows XP machine. Can you
> guide me a with little background on these commands and if possible, how
> execute them in my environment.

You would execute them from a command line prompt. Under XP, choose
Start->Run and type in cmd

That should bring up a command prompt.

Then do

C:
cd \winAVR\bin
touch empty.c
avr-gcc -E -Wp,-dD,-dM empty.c > foo.txt

The output from mine looks like (running" avr-gcc --version" reports 3.4.)

C:\WinAVR\bin>avr-gcc -E -Wp,-dD,-dM empty.c
#define __DBL_MIN_EXP__ (-125)
#define __FLT_MIN__ 1.17549435e-38F
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 32767
#define __DBL_DENORM_MIN__ 1.40129846e-45
#define __FLT_EVAL_METHOD__ 0
#define __DBL_MIN_10_EXP__ (-37)
#define __FINITE_MATH_ONLY__ 0
#define __GNUC_PATCHLEVEL__ 6
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 3.40282347e+38L
#define __LDBL_MAX_EXP__ 128
#define __SCHAR_MAX__ 127
#define __USER_LABEL_PREFIX__
#define __STDC_HOSTED__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __DBL_DIG__ 6
#define __FLT_EPSILON__ 1.19209290e-7F
#define __LDBL_MIN__ 1.17549435e-38L
#define __DECIMAL_DIG__ 9
#define __LDBL_HAS_QUIET_NAN__ 1
#define __GNUC__ 3
#define __DBL_MAX__ 3.40282347e+38
#define __DBL_HAS_INFINITY__ 1
#define __USING_SJLJ_EXCEPTIONS__ 1
#define __DBL_MAX_EXP__ 128
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __GXX_ABI_VERSION 1002
#define __FLT_MIN_EXP__ (-125)
#define __DBL_MIN__ 1.17549435e-38
#define __DBL_HAS_QUIET_NAN__ 1
#define __REGISTER_PREFIX__
#define __AVR_ARCH__ 2
#define __NO_INLINE__ 1
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "3.4.6"
#define __SIZE_TYPE__ unsigned int
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 1.19209290e-7L
#define __AVR 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 2147483647L
#define __FLT_HAS_INFINITY__ 1
#define __LDBL_MANT_DIG__ 24
#define AVR 1
#define __WCHAR_TYPE__ int
#define __AVR__ 1
#define __FLT_DIG__ 6
#define __INT_MAX__ 32767
#define __FLT_MAX_EXP__ 128
#define __DBL_MANT_DIG__ 24
#define __WINT_TYPE__ unsigned int
#define __LDBL_MIN_EXP__ (-125)
#define __LDBL_MAX_10_EXP__ 38
#define __DBL_EPSILON__ 1.19209290e-7
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __FLT_MAX__ 3.40282347e+38F
#define __FLT_MIN_10_EXP__ (-37)
#define __GNUC_MINOR__ 4
#define __DBL_MAX_10_EXP__ 38
#define __LDBL_DENORM_MIN__ 1.40129846e-45L
#define __PTRDIFF_TYPE__ int
#define __LDBL_MIN_10_EXP__ (-37)
#define __LDBL_DIG__ 6

>
> On 6/16/07, Dave Hylands wrote:
> >
> > Hi Rakesh,
> >
> > > I am looking for a list of Commands/Macros which are available in AVR
> > GCC
> > > documented at one place. I looked around at the google but couldn't find
> > > anything significant. Do you know any web-links or have anything, please
> > do
> > > send it to the group or upload in the files section.
> >
> > If you execute the following commands:
> >
> > touch empty.c
> > avr-gcc -E -Wp,-dD,-dM empty.c
> >
> > this will print out a list of all of the builtin macros along with
> > their values. If you replace empty.c with a real source file, then it
> > will print out all of the macros in effect by the end of the source
> > file.
> >
> > Note that "-Wp,-dD,-dM" is one option with no spaces after any of the
> > commas.
> >
> > --
> > Dave Hylands
> > Vancouver, BC, Canada
> > http://www.DaveHylands.com/
> >
> > --
> Rakesh.
> http://gopchandani.wordpress.com
> [Non-text portions of this message have been removed]
> Yahoo! Groups Links
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] AVR GCC - Commands/Marco List? - Rakesh Kumar - Jun 16 15:16:28 2007

Hey,

Yes, that totally did the trick. Thanks man. :-)
On 6/16/07, Dave Hylands wrote:
>
> Hi Rakesh,
>
> > However, I don't really get the context of where to execute these
> commands.
> > I use AVR-GCC (WinAVR) in the AVR Studio on my Windows XP machine. Can
> you
> > guide me a with little background on these commands and if possible, how
> > execute them in my environment.
>
> You would execute them from a command line prompt. Under XP, choose
> Start->Run and type in cmd
>
> That should bring up a command prompt.
>
> Then do
>
> C:
> cd \winAVR\bin
> touch empty.c
> avr-gcc -E -Wp,-dD,-dM empty.c > foo.txt
>
> The output from mine looks like (running" avr-gcc --version" reports 3.4.)
>
> C:\WinAVR\bin>avr-gcc -E -Wp,-dD,-dM empty.c
> #define __DBL_MIN_EXP__ (-125)
> #define __FLT_MIN__ 1.17549435e-38F
> #define __CHAR_BIT__ 8
> #define __WCHAR_MAX__ 32767
> #define __DBL_DENORM_MIN__ 1.40129846e-45
> #define __FLT_EVAL_METHOD__ 0
> #define __DBL_MIN_10_EXP__ (-37)
> #define __FINITE_MATH_ONLY__ 0
> #define __GNUC_PATCHLEVEL__ 6
> #define __SHRT_MAX__ 32767
> #define __LDBL_MAX__ 3.40282347e+38L
> #define __LDBL_MAX_EXP__ 128
> #define __SCHAR_MAX__ 127
> #define __USER_LABEL_PREFIX__
> #define __STDC_HOSTED__ 1
> #define __LDBL_HAS_INFINITY__ 1
> #define __DBL_DIG__ 6
> #define __FLT_EPSILON__ 1.19209290e-7F
> #define __LDBL_MIN__ 1.17549435e-38L
> #define __DECIMAL_DIG__ 9
> #define __LDBL_HAS_QUIET_NAN__ 1
> #define __GNUC__ 3
> #define __DBL_MAX__ 3.40282347e+38
> #define __DBL_HAS_INFINITY__ 1
> #define __USING_SJLJ_EXCEPTIONS__ 1
> #define __DBL_MAX_EXP__ 128
> #define __LONG_LONG_MAX__ 9223372036854775807LL
> #define __GXX_ABI_VERSION 1002
> #define __FLT_MIN_EXP__ (-125)
> #define __DBL_MIN__ 1.17549435e-38
> #define __DBL_HAS_QUIET_NAN__ 1
> #define __REGISTER_PREFIX__
> #define __AVR_ARCH__ 2
> #define __NO_INLINE__ 1
> #define __FLT_MANT_DIG__ 24
> #define __VERSION__ "3.4.6"
> #define __SIZE_TYPE__ unsigned int
> #define __FLT_RADIX__ 2
> #define __LDBL_EPSILON__ 1.19209290e-7L
> #define __AVR 1
> #define __FLT_HAS_QUIET_NAN__ 1
> #define __FLT_MAX_10_EXP__ 38
> #define __LONG_MAX__ 2147483647L
> #define __FLT_HAS_INFINITY__ 1
> #define __LDBL_MANT_DIG__ 24
> #define AVR 1
> #define __WCHAR_TYPE__ int
> #define __AVR__ 1
> #define __FLT_DIG__ 6
> #define __INT_MAX__ 32767
> #define __FLT_MAX_EXP__ 128
> #define __DBL_MANT_DIG__ 24
> #define __WINT_TYPE__ unsigned int
> #define __LDBL_MIN_EXP__ (-125)
> #define __LDBL_MAX_10_EXP__ 38
> #define __DBL_EPSILON__ 1.19209290e-7
> #define __FLT_DENORM_MIN__ 1.40129846e-45F
> #define __FLT_MAX__ 3.40282347e+38F
> #define __FLT_MIN_10_EXP__ (-37)
> #define __GNUC_MINOR__ 4
> #define __DBL_MAX_10_EXP__ 38
> #define __LDBL_DENORM_MIN__ 1.40129846e-45L
> #define __PTRDIFF_TYPE__ int
> #define __LDBL_MIN_10_EXP__ (-37)
> #define __LDBL_DIG__ 6
>
> >
> >
> >
> > On 6/16/07, Dave Hylands >
> wrote:
> > >
> > > Hi Rakesh,
> > >
> > > > I am looking for a list of Commands/Macros which are available in
> AVR
> > > GCC
> > > > documented at one place. I looked around at the google but couldn't
> find
> > > > anything significant. Do you know any web-links or have anything,
> please
> > > do
> > > > send it to the group or upload in the files section.
> > >
> > > If you execute the following commands:
> > >
> > > touch empty.c
> > > avr-gcc -E -Wp,-dD,-dM empty.c
> > >
> > > this will print out a list of all of the builtin macros along with
> > > their values. If you replace empty.c with a real source file, then it
> > > will print out all of the macros in effect by the end of the source
> > > file.
> > >
> > > Note that "-Wp,-dD,-dM" is one option with no spaces after any of the
> > > commas.
> > >
> > > --
> > > Dave Hylands
> > > Vancouver, BC, Canada
> > > http://www.DaveHylands.com/
> > >
> > >
> >
> >
> >
> > --
> > Rakesh.
> > http://gopchandani.wordpress.com
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> > --
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.com/
>
>

--
Rakesh.
http://gopchandani.wordpress.com
[Non-text portions of this message have been removed]


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )