pololu / pololu-led-strip-arduino

Arduino library for addressable RGB LED strips from Pololu
http://www.pololu.com/catalog/product/2540
MIT License
163 stars 85 forks source link

Doesn't compile for ESP8266, PlatformIO says it supports ESP8266 #16

Closed biltongza closed 3 years ago

biltongza commented 3 years ago

See https://platformio.org/lib/show/1422/PololuLedStrip

I get this while compiling:

In file included from src\main.cpp:17:0:
.pio\libdeps\nodemcuv2\PololuLedStrip/PololuLedStrip.h: In member function 'virtual void Pololu::PololuLedStrip<pin>::write(Pololu::rgb_color*, unsigned int)':
.pio\libdeps\nodemcuv2\PololuLedStrip/PololuLedStrip.h:279:19: error: there are no arguments to '__disable_irq' that depend on a template parameter, so a declaration of '__disable_irq' must be available [-fpermissive]
     __disable_irq();   // Disable interrupts temporarily because we don't want our pulse timing to be messed up.
                   ^
.pio\libdeps\nodemcuv2\PololuLedStrip/PololuLedStrip.h:279:19: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
.pio\libdeps\nodemcuv2\PololuLedStrip/PololuLedStrip.h:416:22: error: there are no arguments to '__enable_irq' that depend on a template parameter, so a declaration of '__enable_irq' must be available [-fpermissive]
         __enable_irq();
                      ^
.pio\libdeps\nodemcuv2\PololuLedStrip/PololuLedStrip.h:418:23: error: there are no arguments to '__disable_irq' that depend on a template parameter, so a declaration of '__disable_irq' must be available [-fpermissive]
         __disable_irq();
                       ^
.pio\libdeps\nodemcuv2\PololuLedStrip/PololuLedStrip.h:421:18: error: there are no arguments to '__enable_irq' that depend on a template parameter, so a declaration of '__enable_irq' must be available [-fpermissive]
     __enable_irq();         // Re-enable interrupts now that we are done.

I gather __enable_irq() and __disable_irq() don't have definitions on the ESP8266 platform.

Am I missing something?

DavidEGrayson commented 3 years ago

This library uses a lot of inline assembly that depends on the instruction set and clock frequency of your board. We have not yet made this library work on ESP8266. The boards supported by this library are listed in the "Supported platforms" section of README.md:

https://github.com/pololu/pololu-led-strip-arduino#supported-platforms

I just released a new version of the library with some modifications to the metadata in library.properties. That might fix the way it is presented on PlatformIO. Thanks for telling us about the issue.