Before I crash, I tried compiling the same code in Atmel Studio and I'm

Before I crash, I tried compiling the same code in Atmel Studio and I’m getting complaints about missing Arduino.h, which is being called from fastpin.h … Do I need to put the Arduino core files some place where AS can see them?

Never mind, answered my own question. Too tired to think. I’ll get back to this after some ZZZzzzs …

No, I haven’t done the work to make things build when compiling in a non arduino environment, there isn’t a lot to do, but I’d have to get a hold of atmels avr studio to try it out.

Yeah, read my other post. I fixed the Arduino related issues, it’s only complaining about FastSPI now …

it sounds like it may be failing to compile in FastSPI_LED2.cpp - which arduino will do silently for you in the background. Add FastSPI_LED2/FastSPI_LED2.cpp to your build - in fact, all the .cpp files in there need to be explicitly added, most likely.

Yeah, adding .cpps … defining F_CPU in clockless.h, and adjusting the paths for lib8tion.h and hsv2rgb.h inside of hsv2rgb.cpp (but nowhere else) … and it compiled. Haven’t tried uploading it yet to see if it actually works. :slight_smile:

Close but no cigar. It’s slow as heck. Almost as if it’s not setting the proper speeds … The same code compiled in the Arduino IDE competes with a Formula One car …

I suspect it is falling back to the most unoptimized bit banging code (there’s two-four ‘levels’ of optimization In there :slight_smile: because it can’t tell anything about what you’re building for.

Even when I set define a prescaler and set the SPI speed bits?

Yup because my guess is the right defines aren’t getting set by avr studio for the hardware avr support to even be looked at.