I am getting errors when compiling projects that worked prior to the “code refactoring” commit on Branch FastLED3.1 with Arduino 1.0.5 for atmega328p :
core.a(wiring.c.o): In function __vector_16': /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring.c:49: multiple definition of__vector_16’
FastLED/wiring.cpp.o:/foo/libraries/FastLED/wiring.cpp:31: first defined here
core.a(wiring.c.o): In function millis': /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/wiring.c:70: multiple definition ofmillis’
FastLED/wiring.cpp.o:/foo/libraries/FastLED/wiring.cpp:42: first defined here
same for ‘micros’, ‘delay’ and ‘init’.
Anyone else have these errors? The errors disappear when switching back to the “master” branch.
alright, nothing to do with the “code rearrangement” commit, I just deleted the “wiring.cpp” file in the FastLED - directory and the errors disappeared.
How is this file meant to be used?
It’s a replacement for the stock arduino version of millis which takes too long to allow using interrupts for ws2811 chips. Not sure why it wasn’t building for you - as an uno on arduino 1.0.5 is one of my test build targets.
Could you put up (http://gist.github.com or pastebin) the code that you were compiling? I’m curious if there is something in the code that you’re using that’s causing the compiler to pull in the duplicate definitions (removing wiring.c is totally an ok route to take - especially before I put in the ability to configure whether or not the FastLED versions should be used).
Hi Daniel, thanks for your comments.
TL;DR: I resolved the issue.
The project I was trying to compile is:
And I just found the error while looking through the code:
In the file gmaLightMusicHat.h, above the include for <FastLED.h> was a include for <Arduino.h> . After commenting out the <Arduino.h> line, the code now compiles without errors.
sorry, I still had the “master” branch checked out… (I shouldn’t code when I’m too tired) the problem still exists with my project and the “FastLED3.1” branch checked out.
There are still some references to Arduino.h in my code, I will sort through my code tomorrow.
Ok, thanks! I’ll try to figure out where the problem is coming from.
Thanks, @Daniel_Garcia , the commit for disabling interrupts restored my project to working order. I tried different things but have not gotten to a point where I could identify why it compiled with less code and did not compile with all the code 