arduinoarduino-due

Verifying Arduino Due with arm-none-eabi-g++


I'm interested as to what command/s are exactly run behind the scenes when I run

arduino -verify /path/to/file.ino

I'm asking this because I'm working with an Arduino Due board and although I can make the command above work and successfully verify my code, it opens the Arduino GUI briefly, and this somewhat annoys my Continuos Integration system since the OS X machine running it is headless. It is a pain to workaround this problem from the CI system, so I'm just trying to figure out whatever command/s are being run behind the scenes. This way I can just verify my program using g++ or similar, no windows prompted.

So far, I've figured out the arduino verification command uses arm-none-eabi-g++, since that is the compiler for SAM boards like Arduino Due. I've also added all this bunch of arguments:

arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -mthumb -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I/some/includes mainProjectFile.cpp

that I found here.

But I get errors for some low level variables and functions I use, like:

error: 'digitalWriteDirect' was not declared in this scope
     digitalWriteDirect(indpins[iInd], 0);

So I guess there is still something left to include, I just have no idea what. What command or commands are being run behind the scenes when arduino verifies code?

I'd really appreciate your help.

Cheers, Raquel


Solution

  • If you go into File->Preferences in the Arduino IDE, you can turn on Verbose Output During Compilation.

    This will show you exactly what is going on in the log window.