Closed LEDLIT1 closed 2 years ago
Quick fix: I was able to get around this by disabling compiler warnings in the Arduino IDE. It seems like setting compiler warnings causes the compiler to treat warnings as errors. (In IDE: File > Preferences > Compiler warnings -> set to None)
I noticed most of these warnings were fixed in PR #90, but then reverted in 12388545e6. What was the reason for this? It seems like 12388545e6 was perhaps updated from an older version of the file before #90 was merged. @Gitshaoxiang any thoughts?
Thank you. That worked partially. Next, I got a memory storage space issue. I found the resolution for that at https://github.com/m5stack/M5StickC/issues/135. Then it uploaded successfully. Thanks again.
Hi, The FactoryTest sketch will not compile and upload to my M5StickC with Arduino IDE 1.8.13.
Here is the error messages below:
C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino: In function 'void ColorBar()': FactoryTest:560:62: error: operation on 'color_r' may be undefined [-Werror=sequence-point] color_r = (color_r < 255) ? color_r += 1.6 : 255U; ^ FactoryTest:561:62: error: operation on 'color_g' may be undefined [-Werror=sequence-point] color_g = (color_g < 255) ? color_g += 1.6 : 255U; ^ FactoryTest:562:62: error: operation on 'color_b' may be undefined [-Werror=sequence-point] color_b = (color_b < 255) ? color_b += 1.6 : 255U; ^ FactoryTest:602:58: error: operation on 'color_r' may be undefined [-Werror=sequence-point] color_r = (color_r > 2) ? color_r -= 1.5 : 0U; ^ FactoryTest:603:58: error: operation on 'color_g' may be undefined [-Werror=sequence-point] color_g = (color_g > 2) ? color_g -= 1.5 : 0U; ^ FactoryTest:604:58: error: operation on 'color_b' may be undefined [-Werror=sequence-point] color_b = (color_b > 2) ? color_b -= 1.5 : 0U; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino: In function 'void MicRecordfft(void)': C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:846:27: warning: unused variable 'count_i' [-Wunused-variable] uint16_t count_n = 0, count_i = 0, count_x = 0, count_y = 0; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:846:40: warning: unused variable 'count_x' [-Wunused-variable] uint16_t count_n = 0, count_i = 0, count_x = 0, count_y = 0; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:846:53: warning: unused variable 'count_y' [-Wunused-variable] uint16_t count_n = 0, count_i = 0, count_x = 0, count_y = 0; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino: In function 'void Drawdisplay(void)': C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:889:14: warning: unused variable 'count_n' [-Wunused-variable] uint16_t count_n = 0, count_x = 0, count_y = 0; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:890:14: warning: unused variable 'ydata' [-Wunused-variable] uint16_t ydata; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino: In function 'void setup()': C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:1369:13: warning: unused variable 'picptr' [-Wunused-variable] uint16_t picptr = (uint16_t)stick10; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino: In function 'void MPU6886Test()': C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:756:21: warning: 'phi' may be used uninitialized in this function [-Wmaybe-uninitialized] phi = alpha phi + (1 - alpha) last_phi; ^ C:\Users\jlcel\AppData\Local\Temp\arduino_modified_sketch_239320\FactoryTest.ino:755:23: warning: 'theta' may be used uninitialized in this function [-Wmaybe-uninitialized] theta = alpha theta + (1 - alpha) last_theta; ^ cc1plus.exe: some warnings being treated as errors Multiple libraries were found for "WiFi.h" Used: C:\Users\jlcel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi Not used: C:\Program Files (x86)\Arduino\libraries\WiFi Multiple libraries were found for "M5StickC.h" Used: C:\Users\jlcel\Documents\Arduino\libraries\M5StickC Not used: C:\Users\jlcel\Documents\Arduino\libraries\M5StickC-0.2.3 Using library M5StickC at version 0.2.3 in folder: C:\Users\jlcel\Documents\Arduino\libraries\M5StickC Using library Wire at version 1.0.1 in folder: C:\Users\jlcel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\Wire Using library SPI at version 1.0 in folder: C:\Users\jlcel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\SPI Using library FS at version 1.0 in folder: C:\Users\jlcel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\FS Using library SPIFFS at version 1.0 in folder: C:\Users\jlcel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\SPIFFS Using library BLE at version 1.0.1 in folder: C:\Users\jlcel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\BLE Using library WiFi at version 1.0 in folder: C:\Users\jlcel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi exit status 1 operation on 'color_r' may be undefined [-Werror=sequence-point]