Compiling errors with Aurora + Smartled V4 + Teensy 3.6

Hi All,

I am having issues trying to get Aurora working, the Smartled V4 works without any issues using the demo files included with the library, but Aurora keeps crashing while trying to compile.

Arduino: 1.8.9 (Linux), TD: 1.47, Board: "Teensy 3.6, Serial, 180 MHz, Faster, US English"

In file included from /home/pi/Arduino/Aurora/Aurora.ino:64:0:
/home/pi/Arduino/libraries/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.002
 #    pragma message "FastLED version 3.003.002"
                     ^
In file included from /home/pi/Arduino/Aurora/Aurora.ino:73:0:
/home/pi/Arduino/libraries/aJson/aJSON.h:92:6: error: conflicting return type specified for 'virtual int aJsonStream::flush()'
  int flush();
      ^
In file included from /opt/arduino-1.8.9/hardware/teensy/avr/cores/teensy3/Stream.h:24:0,
                 from /opt/arduino-1.8.9/hardware/teensy/avr/cores/teensy3/HardwareSerial.h:252,
                 from /opt/arduino-1.8.9/hardware/teensy/avr/cores/teensy3/WProgram.h:46,
                 from /tmp/arduino_build_228626/pch/Arduino.h:6:
/opt/arduino-1.8.9/hardware/teensy/avr/cores/teensy3/Print.h:62:15: error:   overriding 'virtual void Print::flush()'
  virtual void flush()    { }
               ^
In file included from /home/pi/Arduino/Aurora/Aurora.ino:74:0:
/home/pi/Arduino/libraries/NoUseGifDecoder/GifDecoder.h: In member function 'virtual unsigned int Animations::drawFrame()':
GifDecoder.h:83: error: 'int GifDecoder<32, 32, 12>::frameDelay' is private
     int frameDelay;
         ^
In file included from /home/pi/Arduino/Aurora/Aurora.ino:203:0:
Animations.h:95: error: within this context
       return gifDecoder.frameDelay * 10;
                         ^
/tmp/arduino_build_228626/sketch/Animations.h: In member function 'virtual void Animations::stop()':
Animations.h:103: error: 'fileClose' was not declared in this scope
       fileClose();
                 ^
In file included from /home/pi/Arduino/Aurora/Aurora.ino:229:0:
/tmp/arduino_build_228626/sketch/Settings.h: In member function 'void Settings::openImageFile()':
Settings.h:100: error: 'openGifFilename' was not declared in this scope
       if(!openGifFilename(filepath))
                                   ^
/tmp/arduino_build_228626/sketch/Settings.h: In member function 'virtual void Settings::stop()':
Settings.h:153: error: 'fileClose' was not declared in this scope
       fileClose();
                 ^
In file included from /home/pi/Arduino/Aurora/Aurora.ino:74:0:
GifDecoder.h: In function 'void drawPixelCallback(int16_t, int16_t, uint8_t, uint8_t, uint8_t)':
GifDecoder.h:69: error: 'int GifDecoder<32, 32, 12>::lsdWidth' is private
     int lsdWidth;
         ^
Aurora:278: error: within this context
   if (gifDecoder.lsdWidth == 32 && gifDecoder.lsdHeight == 32) {
                  ^
In file included from /home/pi/Arduino/Aurora/Aurora.ino:74:0:
GifDecoder.h:70: error: 'int GifDecoder<32, 32, 12>::lsdHeight' is private
     int lsdHeight;
         ^
Aurora:278: error: within this context
   if (gifDecoder.lsdWidth == 32 && gifDecoder.lsdHeight == 32) {
                                               ^
/home/pi/Arduino/Aurora/AnimatedGIFs.ino: At global scope:
AnimatedGIFs:91: error: redefinition of 'const uint8_t kMatrixWidth'
 const uint8_t kMatrixWidth = 32;        // known working: 32, 64, 96, 128
               ^
/home/pi/Arduino/Aurora/Aurora.ino:31:15: note: 'const uint8_t kMatrixWidth' previously defined here
 const uint8_t kMatrixWidth = 32;        // known working: 32, 64, 96, 128
               ^
AnimatedGIFs:92: error: redefinition of 'const uint8_t kMatrixHeight'
 const uint8_t kMatrixHeight = 32;       // known working: 16, 32, 48, 64
               ^
/home/pi/Arduino/Aurora/Aurora.ino:32:15: note: 'const uint8_t kMatrixHeight' previously defined here
 const uint8_t kMatrixHeight = 32;       // known working: 16, 32, 48, 64
               ^
AnimatedGIFs:93: error: redefinition of 'const uint8_t kRefreshDepth'
 const uint8_t kRefreshDepth = 36;       // known working: 24, 36, 48
               ^
/home/pi/Arduino/Aurora/Aurora.ino:33:15: note: 'const uint8_t kRefreshDepth' previously defined here
 const uint8_t kRefreshDepth = 36;       // known working: 24, 36, 48
               ^
AnimatedGIFs:94: error: redefinition of 'const uint8_t kDmaBufferRows'
 const uint8_t kDmaBufferRows = 2;       // known working: 2-4
               ^
/home/pi/Arduino/Aurora/Aurora.ino:34:15: note: 'const uint8_t kDmaBufferRows' previously defined here
 const uint8_t kDmaBufferRows = 4;       // known working: 2-4, use 2 to save memory, more to keep from dropping frames and automatically lowering refresh rate
               ^
AnimatedGIFs:95: error: redefinition of 'const uint8_t kPanelType'
 const uint8_t kPanelType = SMARTMATRIX_HUB75_32ROW_MOD16SCAN; // use SMARTMATRIX_HUB75_16ROW_MOD8SCAN for common 16x32 panels
               ^
/home/pi/Arduino/Aurora/Aurora.ino:35:15: note: 'const uint8_t kPanelType' previously defined here
 const uint8_t kPanelType = SMARTMATRIX_HUB75_32ROW_MOD16SCAN;   // use SMARTMATRIX_HUB75_16ROW_MOD8SCAN for common 16x32 panels
               ^
AnimatedGIFs:96: error: redefinition of 'const uint8_t kMatrixOptions'
 const uint8_t kMatrixOptions = (SMARTMATRIX_OPTIONS_NONE);    // see http://docs.pixelmatix.com/SmartMatrix for options
               ^
/home/pi/Arduino/Aurora/Aurora.ino:36:15: note: 'const uint8_t kMatrixOptions' previously defined here
 const uint8_t kMatrixOptions = (SMARTMATRIX_OPTIONS_NONE);      // see http://docs.pixelmatix.com/SmartMatrix for options
               ^
AnimatedGIFs:97: error: redefinition of 'const uint8_t kBackgroundLayerOptions'
 const uint8_t kBackgroundLayerOptions = (SM_BACKGROUND_OPTIONS_NONE);
               ^
/home/pi/Arduino/Aurora/Aurora.ino:37:15: note: 'const uint8_t kBackgroundLayerOptions' previously defined here
 const uint8_t kBackgroundLayerOptions = (SM_BACKGROUND_OPTIONS_NONE);
               ^
AnimatedGIFs:98: error: redefinition of 'const uint8_t kScrollingLayerOptions'
 const uint8_t kScrollingLayerOptions = (SM_SCROLLING_OPTIONS_NONE);
               ^
/home/pi/Arduino/Aurora/Aurora.ino:38:15: note: 'const uint8_t kScrollingLayerOptions' previously defined here
 const uint8_t kScrollingLayerOptions = (SM_SCROLLING_OPTIONS_NONE);
               ^
In file included from /home/pi/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5:0,
                 from /tmp/arduino_build_228626/sketch/Hardware.h:23,
                 from /home/pi/Arduino/Aurora/Aurora.ino:25:
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:155:249: error: redefinition of 'uint32_t matrixUpdateData [780]'
     static DMAMEM uint32_t matrixUpdateData[buffer_rows * (pwm_depth/COLOR_CHANNELS_PER_PIXEL / sizeof(uint32_t)) * ((((width * height) / CONVERT_PANELTYPE_TO_MATRIXPANELHEIGHT(panel_type)) * DMA_UPDATES_PER_CLOCK + ADDX_UPDATE_BEFORE_LATCH_BYTES))]; \
                                                                                                                                                                                                                                                         ^
/home/pi/Arduino/Aurora/AnimatedGIFs.ino:100:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_BUFFERS'
 SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
 ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:155:28: note: 'uint32_t matrixUpdateData [780]' previously declared here
     static DMAMEM uint32_t matrixUpdateData[buffer_rows * (pwm_depth/COLOR_CHANNELS_PER_PIXEL / sizeof(uint32_t)) * ((((width * height) / CONVERT_PANELTYPE_TO_MATRIXPANELHEIGHT(panel_type)) * DMA_UPDATES_PER_CLOCK + ADDX_UPDATE_BEFORE_LATCH_BYTES))]; \
                            ^
/home/pi/Arduino/Aurora/Aurora.ino:79:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_BUFFERS'
 SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
 ^
In file included from /home/pi/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5:0,
                 from /tmp/arduino_build_228626/sketch/Hardware.h:23,
                 from /home/pi/Arduino/Aurora/Aurora.ino:25:
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:156:281: error: redefinition of 'uint8_t matrixUpdateBlocks [500]'
     static DMAMEM uint8_t matrixUpdateBlocks[(sizeof(matrixUpdateBlock) * buffer_rows * pwm_depth/COLOR_CHANNELS_PER_PIXEL) + (sizeof(addresspair) * CONVERT_PANELTYPE_TO_MATRIXROWSPERFRAME(panel_type)) + (sizeof(timerpair) * pwm_depth/COLOR_CHANNELS_PER_PIXEL) + sizeof(timerpair)]; \
                                                                                                                                                                                                                                                                                         ^
/home/pi/Arduino/Aurora/AnimatedGIFs.ino:100:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_BUFFERS'
 SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
 ^
In file included from /home/pi/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5:0,
                 from /tmp/arduino_build_228626/sketch/Hardware.h:23,
                 from /home/pi/Arduino/Aurora/Aurora.ino:25:
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:156:27: note: 'uint8_t matrixUpdateBlocks [500]' previously declared here
     static DMAMEM uint8_t matrixUpdateBlocks[(sizeof(matrixUpdateBlock) * buffer_rows * pwm_depth/COLOR_CHANNELS_PER_PIXEL) + (sizeof(addresspair) * CONVERT_PANELTYPE_TO_MATRIXROWSPERFRAME(panel_type)) + (sizeof(timerpair) * pwm_depth/COLOR_CHANNELS_PER_PIXEL) + sizeof(timerpair)]; \
                           ^
/home/pi/Arduino/Aurora/Aurora.ino:79:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_BUFFERS'
 SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
 ^
In file included from /home/pi/Arduino/libraries/SmartMatrix3/src/SmartLEDShieldV4.h:5:0,
                 from /tmp/arduino_build_228626/sketch/Hardware.h:23,
                 from /home/pi/Arduino/Aurora/Aurora.ino:25:
AnimatedGIFs:100: error: redefinition of 'SmartMatrix3<36, 32, 32, 0u, 0u> matrix'
 SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
                                                                                  ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:157:82: note: in definition of macro 'SMARTMATRIX_ALLOCATE_BUFFERS'
     SmartMatrix3<pwm_depth, width, height, panel_type, option_flags> matrix_name(buffer_rows, matrixUpdateData, matrixUpdateBlocks)
                                                                                  ^
/home/pi/Arduino/Aurora/Aurora.ino:79:30: note: 'SmartMatrix3<36, 32, 32, 0u, 0u> matrix' previously declared here
 SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions);
                              ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:157:70: note: in definition of macro 'SMARTMATRIX_ALLOCATE_BUFFERS'
     SmartMatrix3<pwm_depth, width, height, panel_type, option_flags> matrix_name(buffer_rows, matrixUpdateData, matrixUpdateBlocks)
                                                                      ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:171:67: error: redefinition of 'rgb24 backgroundBitmap [2048]'
     static RGB_TYPE(storage_depth) backgroundBitmap[2*width*height];                                        \
                                                                   ^
/home/pi/Arduino/Aurora/AnimatedGIFs.ino:101:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER'
 SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);
 ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:171:36: note: 'rgb24 backgroundBitmap [2048]' previously declared here
     static RGB_TYPE(storage_depth) backgroundBitmap[2*width*height];                                        \
                                    ^
/home/pi/Arduino/Aurora/Aurora.ino:80:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER'
 SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);
 ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:172:86: error: redefinition of 'SMLayerBackground<rgb24, 0u> backgroundLayer'
     static SMLayerBackground<RGB_TYPE(storage_depth), background_options> layer_name(backgroundBitmap, width, height)  
                                                                                      ^
/home/pi/Arduino/Aurora/AnimatedGIFs.ino:101:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER'
 SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);
 ^
/home/pi/Arduino/Aurora/Aurora.ino:80:39: note: 'SMLayerBackground<rgb24, 0u> backgroundLayer' previously declared here
 SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER(backgroundLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kBackgroundLayerOptions);
                                       ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:172:75: note: in definition of macro 'SMARTMATRIX_ALLOCATE_BACKGROUND_LAYER'
     static SMLayerBackground<RGB_TYPE(storage_depth), background_options> layer_name(backgroundBitmap, width, height)  
                                                                           ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:161:59: error: redefinition of 'uint8_t scrollingLayerBitmap [128]'
     static uint8_t layer_name##Bitmap[width * (height / 8)];                                              \
                                                           ^
/home/pi/Arduino/Aurora/AnimatedGIFs.ino:103:1: note: in expansion of macro 'SMARTMATRIX_ALLOCATE_SCROLLING_LAYER'
 SMARTMATRIX_ALLOCATE_SCROLLING_LAYER(scrollingLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kScrollingLayerOptions);
 ^
/home/pi/Arduino/Aurora/Aurora.ino:81:38: note: 'uint8_t scrollingLayerBitmap [128]' previously declared here
 SMARTMATRIX_ALLOCATE_SCROLLING_LAYER(scrollingLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kScrollingLayerOptions);
                                      ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:161:20: note: in definition of macro 'SMARTMATRIX_ALLOCATE_SCROLLING_LAYER'
     static uint8_t layer_name##Bitmap[width * (height / 8)];                                              \
                    ^
AnimatedGIFs:103: error: redefinition of 'SMLayerScrolling<rgb24, 0u> scrollingLayer'
 SMARTMATRIX_ALLOCATE_SCROLLING_LAYER(scrollingLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kScrollingLayerOptions);
                                      ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:162:84: note: in definition of macro 'SMARTMATRIX_ALLOCATE_SCROLLING_LAYER'
     static SMLayerScrolling<RGB_TYPE(storage_depth), scrolling_options> layer_name(layer_name##Bitmap, width, height)  
                                                                                    ^
/home/pi/Arduino/Aurora/Aurora.ino:81:38: note: 'SMLayerScrolling<rgb24, 0u> scrollingLayer' previously declared here
 SMARTMATRIX_ALLOCATE_SCROLLING_LAYER(scrollingLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kScrollingLayerOptions);
                                      ^
/home/pi/Arduino/libraries/SmartMatrix3/src/SmartMatrix3.h:162:73: note: in definition of macro 'SMARTMATRIX_ALLOCATE_SCROLLING_LAYER'
     static SMLayerScrolling<RGB_TYPE(storage_depth), scrolling_options> layer_name(layer_name##Bitmap, width, height)  
                                                                         ^
AnimatedGIFs: In function 'void screenClearCallback()':
AnimatedGIFs:126: error: redefinition of 'void screenClearCallback()'
 void screenClearCallback(void) {
      ^
/home/pi/Arduino/Aurora/Aurora.ino:269:6: note: 'void screenClearCallback()' previously defined here
 void screenClearCallback(void) {
      ^
AnimatedGIFs: In function 'void updateScreenCallback()':
AnimatedGIFs:130: error: redefinition of 'void updateScreenCallback()'
 void updateScreenCallback(void) {
      ^
/home/pi/Arduino/Aurora/Aurora.ino:273:6: note: 'void updateScreenCallback()' previously defined here
 void updateScreenCallback(void) {
      ^
AnimatedGIFs: In function 'void drawPixelCallback(int16_t, int16_t, uint8_t, uint8_t, uint8_t)':
AnimatedGIFs:134: error: redefinition of 'void drawPixelCallback(int16_t, int16_t, uint8_t, uint8_t, uint8_t)'
 void drawPixelCallback(int16_t x, int16_t y, uint8_t red, uint8_t green, uint8_t blue) {
      ^
/home/pi/Arduino/Aurora/Aurora.ino:277:6: note: 'void drawPixelCallback(int16_t, int16_t, uint8_t, uint8_t, uint8_t)' previously defined here
 void drawPixelCallback(int16_t x, int16_t y, uint8_t red, uint8_t green, uint8_t blue) {
      ^
AnimatedGIFs: In function 'void setup()':
AnimatedGIFs:139: error: redefinition of 'void setup()'
 void setup() {
      ^
/home/pi/Arduino/Aurora/Aurora.ino:290:6: note: 'void setup()' previously defined here
 void setup()
      ^
AnimatedGIFs: In function 'void loop()':
AnimatedGIFs:199: error: redefinition of 'void loop()'
 void loop() {
      ^
/home/pi/Arduino/Aurora/Aurora.ino:446:6: note: 'void loop()' previously defined here
 void loop()
      ^
Multiple libraries were found for "FastLED.h"
 Used: /home/pi/Arduino/libraries/FastLED
 Not used: /opt/arduino-1.8.9/hardware/teensy/avr/libraries/FastLED
Multiple libraries were found for "SD.h"
 Used: /opt/arduino-1.8.9/hardware/teensy/avr/libraries/SD
 Not used: /opt/arduino-1.8.9/libraries/SD
'int GifDecoder<32, 32, 12>::frameDelay' is private

thanks for your help in advance!

I didn’t take a look at all the errors but I see:

  • You have two .INO files in the Aurora folder, that’s not right
  • What is “NoUseGifDecoder” in libraries and why is it being included?
  • AJson may have been updated since Aurora was last updated and the return type of at least one method has changed, maybe you can use an older version, or update Aurora to match

Thanks for your feedback Louis.

I managed to get it working, (kind of, as it seems that I don’t have the proper remote/ir receiver), but here is what I did.

I am using the latest branch for Aurora/Teensy 3.6:
https://github.com/pixelmatix/aurora/tree/sm3.1-teensy3.6-64x64

Using the latest version of aJson:
https://github.com/interactive-matter/aJson
I also tried a prior version that was supposed to fix some compilation issues as indicated here, but I was getting the same errors.

At the end I edited aJson library following this reference:
https://gitlab.com/xarduino/lightsw/blob/master/patch/ajson-void-flush.patch, and this finally let me compiled the code for Teensy 3.6 :slight_smile:

btw, I also edited the Aurora.ino because I don’t have the audio adapter (link), and changed some references:

From: #include <GifDecoder.h>
To: #include “GifDecoder.h”

And on Animations.h:
From: #include <FilenameFunctions.h>
To: #include “FilenameFunctions.h”

Depending on what you’re looking for, if you just want the Aurora demos, you can find them here as separate code:

And if you just want the gif decoder, you can find it here:

(it’s an updated fork of Louis’ code)

Cheers

2 Likes