arduino.mk (new arduino makefile, works with 1.0)

mafro:
Hey y'all, I've been trying to use the make file on OSX with one of these arduino clones - LeoStick Getting Started Guide | Freetronics

Cool. They look quite similar to the Minimus USBs. I'd never considered trying to get the Arduino library to work on them, though.

I edited the Arduino app's boards.txt to include the two new board profiles, but I get an exception running make. The board profile zip for the Leostick has a "bootloaders" dir and a "cores" dir that I need to somehow include.

According to the instructions on the page you linked to, you're supposed to unzip the zip-file somewhere and then tell the IDE to use that instead of its own library directory. I think, for the makefile, just changing the ARDUINODIR parameter to the path of wherever you've unzipped the zip-file will work.

The zip-file contains its own boards.txt, which has a profile for leostick and leostickv2. But, unless I'm wrong, I think it has some errors. There are two problems:

  1. For version 1 LeoSticks, "leostick.bootloader.path=diskloader" tells the IDE/makefile to look in "bootloaders/diskloader", which doesn't exist. I don't think that "make bootloader" will work (and I would imagine uploading the bootloader from the IDE is also broken).

  2. For version 2 LeoSticks, I think "leostickv2.build.core=arduino:arduino" should be "leostickv2.build.core=arduino". The makefile will certainly complain if this is not changed.

Finally, in order for the makefile to know to use the leostickv1 core, it has to read the leostick.build.core parameter from boards.txt. Unfortunately, this isn't done in the last release of the makefile. But I've just patched it, so it will now! :o) So you'll have to download the latest development version of the makefile for this to work.