I think I managed to get the lib to compile in AVR Studio,

I think I managed to get the lib to compile in AVR Studio, I still have to run a sample code just to be sure.
The solution might be as simple as just adding an #include <Arduino.h> inside the FastLED.h file.
Maybe it should be wrapped in something like this:
#if (ARDUINO >= 100)
#include <Arduino.h>
#endif
Just to make sure we don’t try to include the arduino.h file while not actually using an arduino!
I’ll get this on github as well, just for the record.

The problem isn’t just the inclusion of that header file. For example, the Pin class has fallbacks to methods like digitalPinToBitMask/portOutputRegister/etc… that are defined in pins_arduino.h, and there are a couple of other places where I’m still using arduino convenience functions because I haven’t done non-arduino versions of them. (Though, the fallback functions I’m not sure can get non-arduino versions - the whole point of them is to provide pin access when compiling on arduino compatible platforms that I haven’t yet defined hardware level pin access for yet).

It compiled well on my computer. I have yet to upload the code to the board to make sure it works or not. But I’m pretty confident. I’ll test tomorrow and keep you updated.

It likely compiled because you’re using a platform that there’s already pin definitions for, so it won’t fall back to the base class.

(Also note that it likely won’t compile for arm platforms out there - as the k20 and sam3x8 pin classes still use the arduino convinience methods to set pin modes, I’ve been lazy and haven’t moved those over to direct io reg manipulation, yet).

Mmmm, got it.Fight not over yet then!

I’m still working on how to allow the compilation inside Atmel Studio. For now, it compiles well, but the lib doesn’t work (for now!).
I wanted to have your input on how we can resolve the problem. The way I see it, as there are few calls to the arduino lib, we could replace entirely the functions by their arduinos counterpart, either directly inline, or by adding a new header file.
What do you think?

I did get the lib to compile and execute well by changing the optimisation back from “optimize for size” to “optimize most”.