Production Sketch Errors

Just ran VERIFY on the sktech. It produces the same errors when trying to upload. This output is with verbose on.

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="Arduino Leonardo" -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM -I
C:\Program Files (x86)\Arduino\libraries\FastLED -I
C:\Program Files (x86)\Arduino\libraries\BlinkyTape_Arduino
C:\Users\Patrick\AppData\Local\Temp\build3706842885601128457.tmp\ColorLoop.cpp -o
C:\Users\Patrick\AppData\Local\Temp\build3706842885601128457.tmp\ColorLoop.cpp.o
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="Arduino Leonardo" -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM -I
C:\Program Files (x86)\Arduino\libraries\FastLED -I
C:\Program Files (x86)\Arduino\libraries\BlinkyTape_Arduino
C:\Users\Patrick\AppData\Local\Temp\build3706842885601128457.tmp\Flashlight.cpp -o
C:\Users\Patrick\AppData\Local\Temp\build3706842885601128457.tmp\Flashlight.cpp.o
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="Arduino Leonardo" -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo -I
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\EEPROM -I
C:\Program Files (x86)\Arduino\libraries\FastLED -I
C:\Program Files (x86)\Arduino\libraries\BlinkyTape_Arduino
C:\Users\Patrick\AppData\Local\Temp\build3706842885601128457.tmp\ProductionSketch.cpp -o
C:\Users\Patrick\AppData\Local\Temp\build3706842885601128457.tmp\ProductionSketch.cpp.o

In file included from C:\Program Files (x86)\Arduino\libraries\FastLED/FastLED.h:43:0,
from ProductionSketch.ino:4:
C:\Program Files (x86)\Arduino\libraries\FastLED/fastled_progmem.h:45:57: error: section attribute not allowed for 'frameData'
#define PROGMEM __attribute__((section(".progmem.data")))
^
C:\Program Files (x86)\Arduino\libraries\BlinkyTape_Arduino/Animation.h:17:22: note: in expansion of macro 'PROGMEM'
uint8_t* frameData PROGMEM; // Pointer to the begining of the frame data
^
C:\Program Files (x86)\Arduino\libraries\FastLED/fastled_progmem.h:45:57: error: section attribute not allowed for 'currentFrameData'
#define PROGMEM __attribute__((section(".progmem.data")))
^
C:\Program Files (x86)\Arduino\libraries\BlinkyTape_Arduino/Animation.h:20:29: note: in expansion of macro 'PROGMEM'
uint8_t* currentFrameData PROGMEM; // Pointer to the current position in the frame data
^
C:\Program Files (x86)\Arduino\libraries\FastLED/fastled_progmem.h:45:57: error: section attribute not allowed for 'frameData'
#define PROGMEM __attribute__((section(".progmem.data")))
^
C:\Program Files (x86)\Arduino\libraries\BlinkyTape_Arduino/Animation.h:42:38: note: in expansion of macro 'PROGMEM'
const uint8_t* frameData PROGMEM,
^
C:\Program Files (x86)\Arduino\libraries\FastLED/fastled_progmem.h:45:57: error: section attribute not allowed for 'frameData'
#define PROGMEM __attribute__((section(".progmem.data")))
^
C:\Program Files (x86)\Arduino\libraries\BlinkyTape_Arduino/Animation.h:52:38: note: in expansion of macro 'PROGMEM'
const uint8_t* frameData PROGMEM,
^
Error compiling.

Comments

  • Which version of Arduino and FastLED are you using? Can you compile any of the FastLED examples?

    This looks like a version mismatch issue to me- at some point in recent Arduino releases (maybe the jump from 1.0 to 1.6), the GCC compiler version was updated from a really old but stable one to a newer version, and this affected how PROGMEM works.
  • Same here, but on mac os El Capitan.
    Did brew update, brew upgrade. Also tried on 1.6.5 and 1.6.0 same result.
    Some of example are compiling though: ButtonExample, ColorSwirl and HelloBlinky works, but LotsOfLeds doesn't.
    stack trace:
    Arduino: 1.6.0 (Mac OS X), Board: "Arduino Leonardo"

    Build options changed, rebuilding all
    In file included from /Users/{user_home}/Documents/Arduino/libraries/FastLED-3.1.0/FastLED.h:43:0,
    from LotsOfLeds.ino:3:
    /Users/{user_home}/Documents/Arduino/libraries/FastLED-3.1.0/fastled_progmem.h:45:57: error: section attribute not allowed for 'frameData'
    #define PROGMEM __attribute__((section(".progmem.data")))
    ^
    /Users/{user_home}/Documents/Arduino/libraries/BlinkyTape_Arduino-1.2.0/Animation.h:17:22: note: in expansion of macro 'PROGMEM'
    uint8_t* frameData PROGMEM; // Pointer to the begining of the frame data
    ^
    /Users/{user_home}/Documents/Arduino/libraries/FastLED-3.1.0/fastled_progmem.h:45:57: error: section attribute not allowed for 'currentFrameData'
    #define PROGMEM __attribute__((section(".progmem.data")))
    ^
    /Users/{user_home}/Documents/Arduino/libraries/BlinkyTape_Arduino-1.2.0/Animation.h:20:29: note: in expansion of macro 'PROGMEM'
    uint8_t* currentFrameData PROGMEM; // Pointer to the current position in the frame data
    ^
    /Users/{user_home}/Documents/Arduino/libraries/FastLED-3.1.0/fastled_progmem.h:45:57: error: section attribute not allowed for 'frameData'
    #define PROGMEM __attribute__((section(".progmem.data")))
    ^
    /Users/{user_home}/Documents/Arduino/libraries/BlinkyTape_Arduino-1.2.0/Animation.h:42:38: note: in expansion of macro 'PROGMEM'
    const uint8_t* frameData PROGMEM,
    ^
    /Users/{user_home}/Documents/Arduino/libraries/FastLED-3.1.0/fastled_progmem.h:45:57: error: section attribute not allowed for 'frameData'
    #define PROGMEM __attribute__((section(".progmem.data")))
    ^
    /Users/{user_home}/Documents/Arduino/libraries/BlinkyTape_Arduino-1.2.0/Animation.h:52:38: note: in expansion of macro 'PROGMEM'
    const uint8_t* frameData PROGMEM,
    ^
    Error compiling.

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.
  • Ah, now I see. FastLED 3.1 redefined PROGMEM to be:
    #define PROGMEM __attribute__((section(".progmem.data")))

    which breaks the function definitions in animation.h. Looking at it now...

    A workaround for the moment would be to use FastLED 3.0. Apologies for the trouble!
  • Ok, here's an updated version:
    https://github.com/Blinkinlabs/BlinkyTape_Arduino/releases/tag/2.0.0

    I've updated the class definition for Animation, to remove references to PROGMEM. This was a bug that got exposed by the new version of FastLED. Let me know if there are any issues!
  • Thanks for this fix. The sketches now build properly on my Win10 Machine
Sign In or Register to comment.