FastLED library problem with LQFP32 nano clone

When I
#include <FastLED.h>
I get the following compilation failure:-
In function showPixels' .... undefined reference to timer0_millis'

In the Arduino IDE I've selected LQFP32 board under Tools and have got the standard Blink to run but a LED strip program that runs on a genuine nano fail to compile as above.
FastLED issue is 3.4.

Does anyone know of a fix to this?

Are you using a LGT8F328P ? Why ?
Those chips are not officially supported by Arduino. Others on this forum have trouble uploading a sketch, and if a sketch can be uploaded, then many libraries will not work.

the fasted library is making direct access to the counter and if the board is unknown it's expecting timer0_millis to exist.

extern "C" {
#  if defined(CORE_TEENSY) || defined(TEENSYDUINO)
  extern volatile unsigned long timer0_millis_count;
  #define MS_COUNTER timer0_millis_count
#elif defined(ATTINY_CORE)
  extern volatile unsigned long millis_timer_millis;
  #define MS_COUNTER millis_timer_millis
#elif defined(__AVR_ATmega4809__)
  extern volatile unsigned long timer_millis;
  #define MS_COUNTER timer_millis
#else
  extern volatile unsigned long timer0_millis;  // <=== CATCH ALL OTHER BOARDS
  #define MS_COUNTER timer0_millis
#  endif
};

it does seem to exist in the core definition for that platform though. Did you add the package to the arduino Boards Manager Urls?

what's the exact full error message?

J-M-L - here's the full error message.

In file included from D:\Dropbox\ArduinoSketchbook2018\U3A_LED_demo\U3A_LED_demo.ino:4:0:
D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
 #    pragma message "FastLED version 3.003.003"
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\geowa\AppData\Local\Temp\cc7zh7Qg.ltrans0.ltrans.o: In function `showPixels':
D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790/platforms/avr/clockless_trinket.h:144: undefined reference to `timer0_millis'
D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790/platforms/avr/clockless_trinket.h:144: undefined reference to `timer0_millis'
D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790/platforms/avr/clockless_trinket.h:144: undefined reference to `timer0_millis'
D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790/platforms/avr/clockless_trinket.h:144: undefined reference to `timer0_millis'
D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790/platforms/avr/clockless_trinket.h:144: undefined reference to `timer0_millis'
C:\Users\geowa\AppData\Local\Temp\cc7zh7Qg.ltrans0.ltrans.o:D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790/platforms/avr/clockless_trinket.h:144: more undefined references to `timer0_millis' follow
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for "FastLED.h"
 Used: D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_364790
 Not used: D:\Dropbox\ArduinoSketchbook2018\libraries\arduino_744260
exit status 1
Error compiling for board LGT8F328P-LQFP32 MiniEVB.

===============
I added the unzipped Larduino-HSP hardware directory to the Sketchbook folder (as per instruction on Github) and the board shows up in IDE Tools/Board so I've selected it.

did you do exactly this:

How to install

Add the package to the arduino Boards Manager Urls:

  • Go to Preferences
    • paste this url in Boards Manager URL: https://raw.githubusercontent.com/dbuezas/lgt8fx/master/package_lgt8fx_index.json
  • Go to Tools/Board/Boards manager
    • Type lgt8fx in the search box
    • install lgt8fx

Now the boards appear in the IDE and you can also select the clock speed.

Boards Manager

Variants

Clock

External Clock

@geo3geo Have you accidentally bought a LGT8F328P board ? Get rid of it right now ! Buy a Arduino board or even a clone.

If you bought the LGT8F328P on purpose because you wanted to see how much trouble you get into, well, then you got what you wished for.

J-M-L
I removed the Hardware Support package that I'd added to the IDE Sketchbook folder and did what you suggested and everything now works a treat!
Brilliant!
Many thanks for all this, much appreciated!

Why did I buy it?
Twice the speed, almost half the price, and it uses a standard micro USB connector. Thought it was worth a go.
It's been a lot of hassle but I've learnt quite a bit along the way, and it's raining today so a nice diversion!

1 Like