|
From: | Georg-Johann Lay |
Subject: | Re: [avr-gcc-list] Location of symbol definition |
Date: | Sun, 26 Jan 2014 18:25:06 +0100 |
User-agent: | Thunderbird 2.0.0.24 (Windows/20100228) |
dfx schrieb:
Hi, often in code written by 'gurus' I find expressions of the type# if defined (__AVR_ATmega168__), but looking at the code I can not find the definition anywhere.The question is: where these symbols (with double underscore) are defined?
These are built-in defines, some of the AVR-specific ones are explained at http://gcc.gnu.org/onlinedocs/gcc/AVR-Options.htmlIn order to find the location of a definition, add -g3 -save-temps to the compiler command options and inspect the respective .i (for C) or .ii (for C++) files. It lists how a macro is defined and where a definition comes from, e.g. command line, built-in or some source #define.
Johann
[Prev in Thread] | Current Thread | [Next in Thread] |