queezythegreat / arduino-cmake

Arduino CMake Build system
645 stars 216 forks source link

Adding support for SDK 1.5 #104

Open iceseyes opened 9 years ago

iceseyes commented 9 years ago

Hi, I'm writing a atmega2560 and I found this beatiful toolchain. I've found some little issue using Arduino 1.5 and with some library. So I change Arduino.cmake file for

Hope it is helpful for you.

queezythegreat commented 9 years ago

Hi, awesome work. I have had a initial look at your changes and they look great.

I will have to do some testing to see if everything works on earlier versions before I merge in your changes.

The only change I would make is instead of having a global ARDUINO_CPU variable, I would make it an option in the commands (say CPU). Since a single build system may build multiple firmwares for different hardware.

I would rather have a ARDUINO_DEFAULT_CPU global variable (like here: Arduino.cmake#L462 ) that is used to populate the ARDUINO_CPU variable if it is not specified in the command arguments.

Anyways, thanks for contributing to the project. I think a couple of people will be happy to have partial Arduino 1.5 support. Getting ARM support will be more work I think :)

JoakimSoderberg commented 8 years ago

:+1: for merging this, since it's required for latest arduino version to work (tested on OSX, v1.6.7) together with #107

Javiergg commented 7 years ago

Hi, I've just starting using this fantastic tool and faced the same issue: the build fails because the ARDUINO_CPU is not defined.

I've defined this variable by hand in the CMakeList file, but I don't think it's the best solution. Is there a better way? Maybe something like what @iceseyes proposes.

I've been checking the files that come in the CLion plugin and the version here in Github, but couldn't find anything of the sort. Are there plans to integrate this functionality? I actually applies to the mega board but also to many others.