Generally, if you want to find identifiers in your Arduino board support, you can run the ctags program on the libc and Arduino core files. ctags is used as part of the build process in its effort to generate C++ declarations for you. So it is generally available to you as an Arduino user. You should find ctags
or ctags.exe
in:
/path/to/arduino15/builtin/tools/ctags/
version-number/
This can be run against your board support in:
/path/to/arduino15/packages/
vendor/hardware/
architecture/
version-number/
And your standard libraries found under directories in the form of:
/path/to/arduino15/packages/
vendor/tools/
compiler-tool/
version-number/
If you're wondering what /path/to/arduino15/ would be on your system, it's documented here in terms of where the preferences file is stored. The relevant paths containing and version numbers and architecture names should show in the verify/compile output when verbose mode is turned on in preferences.
Specific example
On my linux system with reasonably current versions of UNO-related things, my command-line would look like:
~/.arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags \
-f /tmp/output-file \
-R \
~/.arduino15/packages/arduino/hardware/avr/1.8.3/ \
~/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/avr/include/
The resulting tag file can then grep
ed or just opened and the following entries can be found, showing the filenames and line numbers to investigate:
DigitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/circuitplay32u4/pins_arduino.h 138;" d
digitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/ethernet/pins_arduino.h 79;" d
digitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/gemma/pins_arduino.h 64;" d
digitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/leonardo/pins_arduino.h 160;" d
digitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/mega/pins_arduino.h 110;" d
digitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/robot_control/pins_arduino.h 120;" d
digitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/robot_motor/pins_arduino.h 115;" d
digitalPinToInterrupt /home/user/.arduino15/packages/arduino/hardware/avr/1.8.3/variants/standard/pins_arduino.h 79;" d
In the case of an UNO the standard
variant is the significant declaration.
There are different implementations of ctags. The one used by the Arduino support files is Exuberant CTAGS and you may want to read its documentation, to learn how to control the program to display differently to only search for specific identifiers, etc. It is also typically used with editors that have some special support for the resulting tags file, to jump to definitions, like an IDE would.
Arduino.h
?