Arduino Due, Mac OS 10.11.6, Arduino 1.6.12 can't compile

Hi,

I installed the latest versions of:

Arduino 1.6.12 Arduino SAM Boards 1.6.9

Under Tools->Board, I selected "Arduino Due (programming port)"

When I try to compile (with verbose output) even the BareMinimum sketch, I get this error:

Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/ag/Library/Arduino15/packages -hardware /Users/ag/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/ag/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/ag/Documents/Arduino/libraries -fqbn=arduino:sam:arduino_due_x_dbg -ide-version=10612 -build-path /var/folders/hn/jd02xm_s5h38hf_f_j8fyzgm0000gp/T/arduino_build_610370 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/Users/ag/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1 -prefs=runtime.tools.bossac.path=/Users/ag/Library/Arduino15/packages/arduino/tools/bossac/1.6.1-arduino -verbose /Applications/Arduino.app/Contents/Java/examples/01.Basics/BareMinimum/BareMinimum.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/ag/Library/Arduino15/packages -hardware /Users/ag/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/ag/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/ag/Documents/Arduino/libraries -fqbn=arduino:sam:arduino_due_x_dbg -ide-version=10612 -build-path /var/folders/hn/jd02xm_s5h38hf_f_j8fyzgm0000gp/T/arduino_build_610370 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=/Users/ag/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1 -prefs=runtime.tools.bossac.path=/Users/ag/Library/Arduino15/packages/arduino/tools/bossac/1.6.1-arduino -verbose /Applications/Arduino.app/Contents/Java/examples/01.Basics/BareMinimum/BareMinimum.ino
Using board 'arduino_due_x_dbg' from platform in folder: /Users/ag/Library/Arduino15/packages/arduino/hardware/sam/1.6.9
Using core 'arduino' from platform in folder: /Users/ag/Library/Arduino15/packages/arduino/hardware/sam/1.6.9
Detecting libraries used...
"/Users/ag/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf  -w -x c++ -E -CC -mmcu=cortex-m3 -DF_CPU=84000000L -DARDUINO=10612 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM  -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Due"' "-I/Users/ag/Library/Arduino15/packages/arduino/hardware/sam/1.6.9/cores/arduino" "-I/Users/ag/Library/Arduino15/packages/arduino/hardware/sam/1.6.9/variants/arduino_due_x" "/var/folders/hn/jd02xm_s5h38hf_f_j8fyzgm0000gp/T/arduino_build_610370/sketch/BareMinimum.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/Users/ag/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf  -w -x c++ -E -CC -mmcu=cortex-m3 -DF_CPU=84000000L -DARDUINO=10612 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM  -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON '-DUSB_MANUFACTURER="Arduino LLC"' '-DUSB_PRODUCT="Arduino Due"' "-I/Users/ag/Library/Arduino15/packages/arduino/hardware/sam/1.6.9/cores/arduino" "-I/Users/ag/Library/Arduino15/packages/arduino/hardware/sam/1.6.9/variants/arduino_due_x" "/var/folders/hn/jd02xm_s5h38hf_f_j8fyzgm0000gp/T/arduino_build_610370/sketch/BareMinimum.ino.cpp" -o "/var/folders/hn/jd02xm_s5h38hf_f_j8fyzgm0000gp/T/arduino_build_610370/preproc/ctags_target_for_gcc_minus_e.cpp"
arm-none-eabi-g++: error: unrecognized command line option '-mmcu=cortex-m3'
exit status 1
Error compiling for board Arduino Due (Programming Port).

It seems like the tool is confused and is trying to use -mmcu=cortex-m3 instead of -mcpu=cortex-m3.

Just for grins, I tried running this from the command line, changing -mmcu to -mcpu, and it got further, but died looking for chips.h.

I tried the same thing on a fresh install on Windows 10 and it works, so there is something stale in my environment I'm guessing which is causing the mashup of AVR and SAM.

Any ideas where this mixup could be?

Thanks,

Ag Primatic

I found my problem.

I had a hardware sub-directory in my Arduino directory from a long, long time ago that had some attiny stuff in it.

When I moved this folder out of my Arduino directory, Due compiles now work.

Thought I should post this just in case someone else had a similar issue someday.

Ag