Monday, 8 June 2015

better way to install Sanguino in Arduino 1.6.4

After working out how to do it manualy in the previous post, I found a much more system friendly way to install it.

Download the IDE

Start up Arduino IDE

Open up the menu   File|Preferences

At the bottom is a field  Additional Boards manager URLs:
Enter ""

Click OK

Open up the menu Tools|Board:|Boards manager...

This will open the manager. Scroll down till you see Sanguino
Click more info, this will reveal an install button.

Hit install.

Close the Board manager.

Your done!

Of interest this doesn't use any of the legacy core code from the Sanguino install files.


Sunday, 7 June 2015

How to install sanguino in arduino 1.6.4 for linux

Edit: This is not the best way, see  better way 


Original post for the curious. It works but uses legacy code that isn't current.


Several people of late have been asking how to get Sanguino support working in Arduino 1.6.4  so they can use it on Sanguinololu and Gen7 Reprap controllers.

Here is how to do it manually:

Firstly install the latest Arduino IDE and install as per usual

Also download the standard  Sanguino files 1.0.1, extract to in my case arduino-1.6.4/hardware

Now the fun part starts

cd into arduino-1.6.4/hardware/sanguino
mkdir avr
mv * avr     (moves everything into the new subdirectory, except avr, as its locked)

Now we need to create a new platform.txt, best to copy it from the arduino directory

cd avr
cp ../../arduino/avr/platform.txt .

Now edit the new platform.txt 

Find "name=Arduino AVR Boards" and change it into "name=Sanguino AVR Boards"

Now Sanguino is visible in the Arduino IDE but you still cant upload.

Uploading gives the error "Error while uploading: missing 'upload.tool' configuration parameter"

To fix this add {board name}.upload.tool=avrdude to each board section of your sanguino boards.txt


It now Compiles and uploads

NB I have tested this briefly on a 644p Sanguinololu, but not thoroughly. 



There is an additional issue that presents itself on 644p but not on 1284p
I don't know the cause, if its marlin or the sanguino files. 

If you get the error

"/arduino-1.6.4/hardware/sanguino/avr/cores/arduino/HardwareSerial.cpp:132:15: error: attempt to use poisoned "SIG_USART1_RECV"
 #elif defined(SIG_USART1_RECV)"

I had to edit hardware/sanguino/avr/cores/arduino/HardwareSerial.cpp
I commented out lines 132-133
//#elif defined(SIG_USART1_RECV)
//  #error SIG_USART1_RECV

It now compiles.

I had further issues with uploading

The dreaded "avrdude: stk500v2_ReceiveMessage(): timeout"
This is a well known issue where the bootloader is not what the boards.txt expected. It can be the baud rate or the protocol.

In my case it was a old protocol
I changed the following in boards.txt



And it uploaded fine.