Arduino Due Source files?

Hi all!
I've a small problem: I have downloaded the Due libs to the Arduino IDE, so I can now program the Due board, but I still cant find the source files for that board in my folders. There seems to be only ones for AVR based boards, not ARM. Can anyone suggest where exactly they are located?
Thanks!

Here's the easiest way to find them:

  • Select Arduino Due from the Tools > Board menu
  • File > Examples > SPI > BarometricPressureSensor
  • Sketch > Show Sketch Folder

That will open the example sketch subfolder of the SPI library, which is located in the Arduino SAM Boards hardware package. You will find the source code in the various folders of that package. You will also find the toolchain (which contains some source files) used by the Arduino SAM Boards package a few more folder levels up in packages/arduino/tools.

Files for Boards added with the board manager end up in weird places, dependent on OS and such.
The easiest way to find them is probably to turn on "verbose" compilation and copy the output somewhere where you can read it easily, and copy from there. On windows, it'll probably be something like
\AppData\Local\Arduino15\packages\arduino*
(Note that "AppData" is normally a "Hidden" directory. Sigh.)

I like to use the "portable" feature, in which case things end up in /portable/packages/arduino/*
(which requires that you have write access to the install directory...)

The hidden directory issue is why I have settled on jumping to the example sketch folder of a bundled library as the easiest solution.