Closed Applepi closed 8 years ago
The library has been updated for the Photon yet. I'll take this as a reminder to do this!!! Thanks!
This is with a Spark core, even compiling locally it still fails.
% particle compile core .
Compiling code for core
Including: /home/nota/rgb/Projects/Adafruit_mfGFX.h /home/nota/rgb/Projects/RGBmatrixPanel.h /home/nota/rgb/Projects/SparkIntervalTimer.h /home/nota/rgb/Projects/fonts.h /home/nota/rgb/Projects/gamma.h /home/nota/rgb/Projects/testshapes_32x32.ino /home/nota/rgb/Projects/Adafruit_mfGFX.cpp /home/nota/rgb/Projects/RGBmatrixPanel.cpp /home/nota/rgb/Projects/SparkIntervalTimer.cpp /home/nota/rgb/Projects/fonts.cpp attempting to compile firmware pushing file: /home/nota/rgb/Projects/Adafruit_mfGFX.h pushing file: /home/nota/rgb/Projects/RGBmatrixPanel.h pushing file: /home/nota/rgb/Projects/SparkIntervalTimer.h pushing file: /home/nota/rgb/Projects/fonts.h pushing file: /home/nota/rgb/Projects/gamma.h pushing file: /home/nota/rgb/Projects/testshapes_32x32.ino pushing file: /home/nota/rgb/Projects/Adafruit_mfGFX.cpp pushing file: /home/nota/rgb/Projects/RGBmatrixPanel.cpp pushing file: /home/nota/rgb/Projects/SparkIntervalTimer.cpp pushing file: /home/nota/rgb/Projects/fonts.cpp Errors Adafruit_mfGFX.cpp:46:0: warning: "pgm_read_byte" redefined [enabled by default]
^ In file included from ../wiring/inc/spark_wiring.h:37:0, from ./inc/application.h:36, from Adafruit_mfGFX.h:13, from Adafruit_mfGFX.cpp:42: ../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
^ Adafruit_mfGFX.cpp: In member function 'Adafruit_GFX::drawChar(short, short, unsigned char, unsigned short, unsigned short, unsigned char)': Adafruit_mfGFX.cpp:487:7: warning: 'line' may be used uninitialized in this function [-Wmaybe-uninitialized] if (line & 0x80) { ^ In file included from RGBmatrixPanel.cpp:39:0: RGBmatrixPanel.h:4:0: warning: "pgm_read_byte" redefined [enabled by default]
^ In file included from ../wiring/inc/spark_wiring.h:37:0, from ./inc/application.h:36, from Adafruit_mfGFX.h:13, from RGBmatrixPanel.h:3, from RGBmatrixPanel.cpp:39: ../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
^ In file included from RGBmatrixPanel.cpp:41:0: SparkIntervalTimer.h:60:2: warning: #warning "CORE NEW" [-Wcpp]
^ In file included from SparkIntervalTimer.cpp:24:0: SparkIntervalTimer.h:60:2: warning: #warning "CORE NEW" [-Wcpp]
^ SparkIntervalTimer.cpp: In member function 'void IntervalTimer::interrupt_SIT(action)': SparkIntervalTimer.cpp:358:15: warning: variable 'TIMx' set but not used [-Wunused-but-set-variable] TIM_TypeDef* TIMx; ^ SparkIntervalTimer.cpp: In member function 'IntervalTimer::start_SIT(unsigned short, bool)': SparkIntervalTimer.cpp:265:43: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIM_ITConfig(TIMx, TIM_IT_Update, ENABLE); ^ SparkIntervalTimer.cpp: In member function 'IntervalTimer::stop_SIT()': SparkIntervalTimer.cpp:344:18: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIM_DeInit(TIMx); ^ SparkIntervalTimer.cpp: In member function 'IntervalTimer::resetPeriod_SIT(unsigned short, bool)': SparkIntervalTimer.cpp:474:23: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIMx->PSC = prescaler; ^ In file included from testshapes_32x32.cpp:11:0: RGBmatrixPanel.h:4:0: warning: "pgm_read_byte" redefined [enabled by default]
^ In file included from ../wiring/inc/spark_wiring.h:37:0, from ./inc/application.h:36, from testshapes_32x32.cpp:2: ../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
^
/tmp/ccgpHspo.ltrans8.ltrans.o: In function attachSystemInterrupt(hal_irq_t, std::function<void ()>)': /spark/compile_service/shared/workspace/0_core_hal_18_0/firmware/main/src/spark_wiring_interrupts.cpp:126: undefined reference to
HAL_Set_System_Interrupt_Handler'
collect2: error: ld returned 1 exit status
make[1]: * [17a384d45ae4239ddcba59aef0f2f96986e4d5f73148464e127952ab0a48.elf] Error 1
make: * [main] Error 2
Compile failed. Exiting.
@Applepi, the new 0.4.5 firmware for both the Core and Photon implement the new HAL whereas the older 0.3.4 Core firmware does not. So the update will take care of that.
Ah flashing with 0.3.4 worked, couldn't find any information about this anywhere, asked on IRC as well but seems it's so dead.
I just tried compiling with 0.4.5 for the Core and I'm weird errors. The code compiles for the Photon just fine however.
In file included from colorwheel_progmem_32x32.cpp:2:0: SparkIntervalTimer/SparkIntervalTimer.h:60:2: warning: #warning "CORE NEW" [-Wcpp]
warning "CORE NEW"
^ In file included from colorwheel_progmem_32x32.cpp:21:0: RGBmatrixPanel/RGBmatrixPanel.h:4:0: warning: "pgm_read_byte" redefined [enabled by default]
define pgm_readbyte(addr) ((const uint8_t *)(addr))
^ In file included from ../wiring/inc/spark_wiring.h:37:0, from ./inc/application.h:36, from colorwheel_progmem_32x32.cpp:2: ../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
define pgm_readbyte(x) ((x))
^ Adafruit_mfGFX/Adafruit_mfGFX.cpp:46:0: warning: "pgm_read_byte" redefined [enabled by default]
define pgm_readbyte(addr) ((const uint8_t *)(addr))
^ In file included from ../wiring/inc/spark_wiring.h:37:0, from ./inc/application.h:36, from Adafruit_mfGFX/Adafruit_mfGFX.h:13, from Adafruit_mfGFX/Adafruit_mfGFX.cpp:42: ../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
define pgm_readbyte(x) ((x))
^ Adafruit_mfGFX/Adafruit_mfGFX.cpp: In member function 'Adafruit_GFX::drawChar(short, short, unsigned char, unsigned short, unsigned short, unsigned char)': Adafruit_mfGFX/Adafruit_mfGFX.cpp:487:7: warning: 'line' may be used uninitialized in this function [-Wmaybe-uninitialized] if (line & 0x80) { ^ In file included from RGBmatrixPanel/RGBmatrixPanel.cpp:39:0: RGBmatrixPanel/RGBmatrixPanel.h:4:0: warning: "pgm_read_byte" redefined [enabled by default]
define pgm_readbyte(addr) ((const uint8_t *)(addr))
^ In file included from ../wiring/inc/spark_wiring.h:37:0, from ./inc/application.h:36, from RGBmatrixPanel/../Adafruit_mfGFX/Adafruit_mfGFX.h:13, from RGBmatrixPanel/RGBmatrixPanel.h:3, from RGBmatrixPanel/RGBmatrixPanel.cpp:39: ../wiring/inc/spark_wiring_arduino.h:32:0: note: this is the location of the previous definition
define pgm_readbyte(x) ((x))
^ In file included from RGBmatrixPanel/RGBmatrixPanel.cpp:41:0: RGBmatrixPanel/../SparkIntervalTimer/SparkIntervalTimer.h:60:2: warning: #warning "CORE NEW" [-Wcpp]
warning "CORE NEW"
^ In file included from SparkIntervalTimer/SparkIntervalTimer.cpp:24:0: SparkIntervalTimer/SparkIntervalTimer.h:60:2: warning: #warning "CORE NEW" [-Wcpp]
warning "CORE NEW"
^ SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'void IntervalTimer::interrupt_SIT(action)': SparkIntervalTimer/SparkIntervalTimer.cpp:358:15: warning: variable 'TIMx' set but not used [-Wunused-but-set-variable] TIM_TypeDef* TIMx; ^ SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'IntervalTimer::start_SIT(unsigned short, bool)': SparkIntervalTimer/SparkIntervalTimer.cpp:265:43: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIM_ITConfig(TIMx, TIM_IT_Update, ENABLE); ^ SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'IntervalTimer::stop_SIT()': SparkIntervalTimer/SparkIntervalTimer.cpp:344:18: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIM_DeInit(TIMx); ^ SparkIntervalTimer/SparkIntervalTimer.cpp: In member function 'IntervalTimer::resetPeriod_SIT(unsigned short, bool)': SparkIntervalTimer/SparkIntervalTimer.cpp:474:23: warning: 'TIMx' may be used uninitialized in this function [-Wmaybe-uninitialized] TIMx->PSC = prescaler; ^ /tmp/ccFfIrQd.ltrans6.ltrans.o: In function
attachSystemInterrupt(hal_irq_t, std::function<void ()>)': /spark/compile_service/shared/workspace/0_core_hal_18_1/firmware/main/src/spark_wiring_interrupts.cpp:126: undefined reference to
HAL_Set_System_Interrupt_Handler' collect2: error: ld returned 1 exit status make[1]: * [c44dbd0b7f7880d94c7335840ff9e03440f10f722d4c8873bb0a99e8c03b.elf] Error 1 make: * [main] Error 2 Error: Could not compile.