Setting up Sanguinololu on OS X for Arduino 1.8.6

Preamble

See the preamble of Trouble compiling Repetier

Following Setting up a Sanguinololu on a Mac, the instructions aren’t quite right of a recent Arduino IDE. They may have worked for 1.0, but they don’t anymore.

See also

  • Trouble compiling Repetier (this was the original blog, until I discovered that the Z-probe was not causing the issue)
  • Selecting the right motherboard in Repetier (this is a bit of a red herring, as I was trying to determine how to get the pin definition for DIOORIG_FAN2_PIN_WPORT. However, it does list the motherboards supported and the necessary settings for the Arduino IDE)
  • DIOORIG_FAN2_PIN_WPORT error (this article get to the crux of the matter and how to resolve the compilation errors)

Links

The real location

Following  Setting up a Sanguinololu on a Mac, from http://code.google.com/p/sanguino/downloads/list download the latest release:

Sanguino-0101r1.zip Added support for Arduino 1.0.1  Featured Sep 4, 2012 215.16KB

Screenshot:

Latest Sanguino files
Latest Sanguino files

and unzip it. and inserting the sanguino folder into the Package Contents of the Arduino IDE application (Contents/Java/hardware)

sanguino folder in the Package Contents
sanguino folder in the Package Contents

caused errors, when opening and closing Boards Manager:

Could not find boards.txt in /Volumes/Home/Users/user/Local_Apps/Arduino/Arduino 1.8.2.app/Contents/Java/hardware/sanguino/bootloaders. Is it pre-1.5?
Could not find boards.txt in /Volumes/Home/Users/user/Local_Apps/Arduino/Arduino 1.8.2.app/Contents/Java/hardware/sanguino/cores. Is it pre-1.5?
Could not find boards.txt in /Volumes/Home/Users/user/Local_Apps/Arduino/Arduino 1.8.2.app/Contents/Java/hardware/sanguino/firmwares. Is it pre-1.5?
Could not find boards.txt in /Volumes/Home/Users/user/Local_Apps/Arduino/Arduino 1.8.2.app/Contents/Java/hardware/sanguino/variants. Is it pre-1.5?
WARNING: Error loading hardware folder /Volumes/Home/Users/user/Local_Apps/Arduino/Arduino 1.8.2.app/Contents/Java/hardware/sanguino
 No valid hardware definitions found in folder sanguino.

Moving the sanguino folder to the hardware folder in the Arduino Home directory (~/Arduino/hardware)

hardware directory in the home Arduino directory
hardware directory in the home Arduino directory

This caused the same errors, when opening and closing Boards Manager and the Sanguino board was still not available in the Board menu:

Examining a Yún shield folder structure, I noticed that boards.txt is held within an avr folder.

hardware directory in the home Arduino directory showing the YunShield directory
hardware directory in the home Arduino directory showing the YunShield directory

So, creating an avr folder within the sanguino folder and moving boards.txt to the new avr sub directory worked (for a while)

Location of boards.txt
Location of boards.txt

You can now select the board

Sanguino in the Board menu
Sanguino in the Board menu

Then upon compilation you get:

Arduino: 1.8.2 (Mac OS X), Board: "Sanguino W/ ATmega644P"

Warning: Board sanguino:avr:atmega644 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA644
Warning: Board sanguino:avr:atmega1284 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA1284
Warning: Board sanguino:avr:atmega12848m doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA12848M
Build options changed, rebuilding all
recipe.preproc.macros pattern is missing

Error compiling for board Sanguino W/ ATmega644P.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

It should also be noted that there is also a platforms.txt file in the avr directory. Creating a sanguino specificplatforms.txtfile, in the ~/Arduino/hardware/sanguino/avr directory,

Sanguino directory in hardware directory with platform.txt file
Sanguino directory in hardware directory with platform.txt file

with the following contents,

# Arduino AVR Core and platform.
# ------------------------------

# For more info:
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification

name=Sanguino
version=1.0

results in the Sanguino header now appearing in the Board menu:

Sanguino header in the Board menu
Sanguino header in the Board menu

Note that you will probably have to restart the Arduino IDE when you make any changes to the contents of the hardware folder.

More

From Customizing the Arduino IDE:

NOTE: In Arduino IDE version 1.5 onwards the format has changed somewhat. Here is the official Arduino IDE 1.5 3rd party Hardware specification

The most important single file is the ‘boards.txt’ file, located in the following directory:

{ARDUINO}/hardware/arduino/boards.txt

where ‘{ARDUINO}’ represents the directory into which the Arduino IDE and supporting files have been installed. This may be ‘/usr/local/arduino’ or ‘/usr/share/arduino’ or one of many OTHER possible choices depending on your operating system.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s