Library Noob Question: How do I view or download library source code?

Where do I find SD.cpp or SPI.cpp?

Thanks

on your computer. turn on verbose mode for compilation and compile ('Verify') some example for the library from IDE Examples menu. you will see the paths in the console.

1 Like

On a Mac you can find them in: /Applications/Arduino.app/Contents/Java/libraries/SD/src/SD.cpp
/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI/src/SPI.cpp

When you install AVR board updates, look for SPI in:
Users/username/Library/Arduino15/packages/arduino/hardware/avr/version/libraries/SPI/src/SPI.cpp

Yes, they are buried deep.

1 Like

Solved.

Thanks!