PCIE0 definition

Could somebody tell me where PCIE0 is defined?? I thought it was in Arduino.h, but could not find it there. Thank you kindly. AA

Assuming we're talking about an Uno R3, in the tools directory tree of your arduino package installation at:

avr-gcc/<insert various compiler versions here>/avr/include/avr/iom328p.h

Yes, UNO R3. Excellent, much appreciated!!. May I ask how you found it??

cd .arduino15/packages/arduino/tools
grep -rH PCIE0 *
1 Like

Should be in .../packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/avr/include/avr/iom328p.h (part of the Microchip/Atmel-provided chip definitions.)

Edit: PS: I think the various xxxx0 defintions that evaluate to 0 (or the xxxN definitions that evaluate to N) are rather pointless. Bit 0 is bit 0 (etc), and it's not like you'll get any sort of warning if you do PORTB |= 1<<PCIE0;

Not using Linux, grep is not recognized. Can the search be done done in Github somehow??

If you are using Arduino IDE 2.x, you can use the IDE's "Go to Definition" feature:

  1. Right click on an occurrence of the object in your sketch code.
    A context menu will open.
  2. Select "Go to Definition" from the menu.
    The file containing the definition or declaration of the object will open in a read-only editor tab in Arduino IDE.

If you want to know the path of the file, hover the mouse pointer over the editor tab. After a couple of seconds, a tooltip will appear that shows the full path of that tab's file.

Right-click on "Go To Definition" gives me "No definition found" for all these defined variables. Using IDE 2.3.4

Do you have "Arduino Uno" selected in Arduino IDE's Tools > Board menu?

I think Windows has a find in files functionality somewhere. I however use grepWin under Windows.

1 Like

No I did not, and that was the problem. Thanks a million!!

1 Like

Thank you all for the replies. VERY much appreciated the help!!

Hello. I'm running this sketch again and it runs correctly. But again right-click on an object occurrence and "Go To Definition" gives me "No definition found". However, unlike before, this time I do have the correct board and port selected (sketch runs correctly). Any hints on why this may happen??

Given that you've already been provided with an option to obtain the information you're after, I'm just going to leave you to it. Some folk are just never satisfied.

I'm satisfied with the option, but such option to obtain the information is no longer working...

Disconnected everything, shut down IDE and reconnected. Everything works again as ptillisch said. Great!! Thanks again.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.