I want to open an AVR header file with avr register and interrupt vector definitions to browse for information on my macos computer. But these files are in Arduino.app package and TextEdit shows the package as grey, can't open it. Damn. Any suggestions?
Command line and vi (or whatever decent editor the mac comes with).
In Finder: Right click on Arduino.app -> Show Package Contents
All the good stuff is in a sub-folder named (unfortunately) "Java". Drag that to the Finder sidebar and you can open it just by clicking on it in the Finder sidebar. If any particular sub-folder is of interest you can drag them to the sidebar, too.
Core: Java/hardware/arduino/avr/cores/arduino/
LibC includes: Java/hardware/tools/avr/avr/include/
Cross-platform libraries: Java/libraries/
AVR-specific libraries: Java/hardware/arduino/avr/libraries
Thank you so much John. Never realized this.
Thank you so much John. Never realized this.
Ok. I now have the air include director in the finder sidebar and I can open an include file, i.e. io.h with textEdit. Great. Now I want to search the contents of the include files for occurrences #define VECTOR Low and behold finder search shows me nothing in the avr directory. If I do same in one of my own source directories works. Is finder refusing to search in folders that are in a *.app folder (package, whatever)?
papaFred:
Ok. I now have the air include director in the finder sidebar and I can open an include file, i.e. io.h with textEdit. Great. Now I want to search the contents of the include files for occurrences #define VECTOR Low and behold finder search shows me nothing in the avr directory. If I do same in one of my own source directories works. Is finder refusing to search in folders that are in a *.app folder (package, whatever)?
Yes. Finder doesn't seem to want to search inside any apps or inside system folders (/Library, /System/Library...)
For the ultimate in file searching you can learn to use the 'grep' command in Terminal. It is very versatile but somewhat complicated. I tend to use it only when I am desperate.
Note: If you install the (Free!) Apple Xcode development environment the .h, .c, and .cpp files will open in Xcode with keyword coloring and everything.
These days it's easier to browse the source on github.
But if I'm not on-line?
LibC includes: Java/hardware/tools/avr/avr/include/
The (Atmel provided) chip register definitions are in .../Java/hardware/tools/avr/avr/include/avr/io*.h
(iom328p.h for Uno.)