FastLED compiling error - Teensy LC

Status
Not open for further replies.

Brion Sohn

Well-known member
So I am having an issue with compiling with a parameter change on FastLED..

This is to a Teensy LC with Arduino 1.8.5 and Teensyduino 1.41

Currently FastLED 3.003.003 is installed via user library install and through the Library manager shows as installed.

So I get the Error of... Multiple libraries were found for "FastLED.h"

when I add:

Code:
  #define FASTLED_ALLOW_INTERRUPTS 1
  #include <FastLED.h>

but when I do not have:

Code:
  #define FASTLED_ALLOW_INTERRUPTS 1

then everything compiles as it should without error.

I am trying to enable interrupts as a test because I am having the typical serial / FastLED problems where when FastLED runs show() it permanently disables interrupts which stops my serial1 receive stream from coming in. I know that this might not be the solution but given the low frequency of the show() command I am using everything may work fine with the interrupts enabled. allowing for the serial stream to run fine and minimal probablility of FastLED show corruption. Im not doing full fledged LED animations which require continuous updating so this is where my thought process is.

I am also working on trying to work up a version using the WS2812Serial Library but I am having an issue with moving the Serial1 Stream to Serial2 two at the moment (but I haven't worked that hard on it).. But there are a couple of concerns with the Library as I can't use it on a normal Arduino which I may need in the future due to the lack of DMA and of course the additional RAM requirement per LED over FastLED.

I also haven't fully figured out how the FastLED with WS2812 plug-in works and what needs to be altered as well as memory differences and things.

Anyway I am going further than my original Multiple Library issue here..

Any Help would be appreciated. Thank you
 
I believe Teensyduino includes a copy of FastLED, is it possible that you have two installed?

(I tried building a small FastLED project for TeensyLC with "#define FASTLED_ALLOW_INTERRUPTS 1" and found other errors:

Code:
/Users/dean/.platformio/packages/framework-arduinoteensy/libraries/FastLED/platforms/arm/kl26/../common/m0clockless.h:316:40: error: 'SysTick' was not declared in this scope
       uint32_t ticksBeforeInterrupts = SysTick->VAL;
                                        ^
/Users/dean/.platformio/packages/framework-arduinoteensy/libraries/FastLED/platforms/arm/kl26/../common/m0clockless.h:326:36: error: 'VARIANT_MCK' was not declared in this scope
       const uint32_t kTicksPerMs = VARIANT_MCK / 1000;
 
I believe Teensyduino includes a copy of FastLED, is it possible that you have two installed?

(I tried building a small FastLED project for TeensyLC with "#define FASTLED_ALLOW_INTERRUPTS 1" and found other errors:

Code:
/Users/dean/.platformio/packages/framework-arduinoteensy/libraries/FastLED/platforms/arm/kl26/../common/m0clockless.h:316:40: error: 'SysTick' was not declared in this scope
       uint32_t ticksBeforeInterrupts = SysTick->VAL;
                                        ^
/Users/dean/.platformio/packages/framework-arduinoteensy/libraries/FastLED/platforms/arm/kl26/../common/m0clockless.h:326:36: error: 'VARIANT_MCK' was not declared in this scope
       const uint32_t kTicksPerMs = VARIANT_MCK / 1000;

Yea other errors come up for me as well but go away if I do not try to compile with the "#define FASTLED_ALLOW_INTERRUPTS 1" line..

The Version included with the Teensy is 3.2 and the newest is 3.3 which I have installed by user addition through the library manager.. It appears that it is trying to go back any use one of the OLDER versions as well as the newer version which is throwing the error.. For other libraries the compiler superseded older with newer and it does .... without that line..

The Library Manager only shows one thread of FastLED actually installed.

Im probably going to try pulling the built-in library from the core and manually replacing it with the newest 3.3 version.

In reality this could be an issue in the 3.3 library but I don't know yet if it really is. If it is I will have to drill through the notes on Fast LED and see if any of the 3.3 changes are pertinent to me.
 
I believe Teensyduino includes a copy of FastLED, is it possible that you have two installed?

(I tried building a small FastLED project for TeensyLC with "#define FASTLED_ALLOW_INTERRUPTS 1" and found other errors:

Code:
/Users/dean/.platformio/packages/framework-arduinoteensy/libraries/FastLED/platforms/arm/kl26/../common/m0clockless.h:316:40: error: 'SysTick' was not declared in this scope
       uint32_t ticksBeforeInterrupts = SysTick->VAL;
                                        ^
/Users/dean/.platformio/packages/framework-arduinoteensy/libraries/FastLED/platforms/arm/kl26/../common/m0clockless.h:326:36: error: 'VARIANT_MCK' was not declared in this scope
       const uint32_t kTicksPerMs = VARIANT_MCK / 1000;


OK So it appears that there is something wrong in the Library when that configuration is used for 3.3.3.. and apparently 3.3.2 as well as I have moved the User installed 3.3.3 and replaced the Teensy included library with 3.3.3 and now it is fine and does not come up with the multiple Libraries complaint but it does come up with the same two errors that you listed. which of course would be a library issue.
 
Status
Not open for further replies.
Back
Top