IDE 1.6.8 with Melzi 1284p


I have been using arduino since several years now. Yesterday I got a prompt telling new version is available! Newer is better (I thought), so uninstalled the old one (I don’t know the version it was), and installed the new 1.6.8.

Nowdays I play with a 3D printer, what has a Melzi main board with an ATMEGA 1284p chip on it, so I downloaded the shanguino bootloader from here (as I did before), and copied the sanguino folder into c:\Program Files (x86)\Arduino\hardware\ folder, as before. When I started the Arduino ide, the new board didn’t show up in Tools/Board menu. After some research, I found the info about to put these modules in two folder deep: First is the vendor, the second is the architecture. So I moved the contents of the sanguino folder into an atmega subdirectory, see in attachment. Now the Melzi 1284p 16 mhz has appeared in Boards menu, but when I try to compile some code, I get the following error message:

Board sanguino:atmega:atmega1284 doesn’t define a ‘build.board’ preference. Auto-set to: ATMEGA_ATMEGA1284
exec: “-w”: executable file not found in %PATH%
Error compiling for board Melzi 1284p 16mhz.

Please help me to solve this problem. Google can’t help me.


Download and install a core which supports the 1.6.x versions of the IDE, like this one: GitHub - MCUdude/MightyCore: Arduino hardware package for ATmega1284, ATmega644, ATmega324, ATmega324PB, ATmega164, ATmega32, ATmega16 and ATmega8535

I recommend using 1.6.5r5, not 1.6.8. The more recent versions have had serious bugs.

Thank you! It seems to work, now I have another error: :confused:

sketch\libraries\twi.c:1:17: fatal error: twi.c: No such file or directory
#include <twi.c>

  • ^*
    compilation terminated.
    exit status 1
    Error compiling for board ATmega1284.

Should I install some kind of plugin, or it is an arduino bug, so I really should use the 1.6.5r5 instead?

That's a missing library. Something i2c related. If you post sketch and full error message we might be able to give further help.

A Melzi board is the same as a "Sanguino".

This from the Marlin page on Github repository;

NOTE: For those who're using sanguino board paired with arduino ide 1.6.8, to add sanguino board to the board list, kindly go to File>Preference>Additional Boards Manager URLs, add the link below