1013
правок
Изменения
ESP
,→Сборка проекта: Дополнил
$ eselect python set 1
</pre>
==== warning: no return statement in function returning non-void ====
Проблема возникает при использовании библиотеки [https://github.com/squix78/esp8266-oled-ssd1306 esp8266-oled-ssd1306].
===== Симптомы =====
<pre>
In file included from /home/avp/sketchbook/libraries/ESP8266_Oled_Driver_for_SSD1306_display/SSD1306Wire.h:31:0,
from /home/avp/sketchbook/libraries/ESP8266_Oled_Driver_for_SSD1306_display/SSD1306.h:30,
from /tmp/arduino_8d8be8ad7edc7c39c779408e245d8629/SSD1306ClockDemo.ino:32:
/home/avp/sketchbook/libraries/ESP8266_Oled_Driver_for_SSD1306_display/OLEDDisplay.h: In member function 'virtual bool OLEDDisplay::connect()':
/home/avp/sketchbook/libraries/ESP8266_Oled_Driver_for_SSD1306_display/OLEDDisplay.h:253:29: warning: no return statement in function returning non-void [-Wreturn-type]
virtual bool connect() {};
</pre>
===== Решение =====
Поменять файл <code>platform.txt</code> в каталоге с проектом, выключив сигнализацию ошибок для некоторых предупреждений:
<pre>
diff --git a/platform.txt b/platform.txt
index 3a8b30b..370b1df 100644
--- a/platform.txt
+++ b/platform.txt
@@ -27,7 +27,7 @@ compiler.c.cmd=xtensa-esp32-elf-gcc
compiler.c.flags=-std=gnu99 -Os -g3 -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
compiler.cpp.cmd=xtensa-esp32-elf-g++
-compiler.cpp.flags=-std=gnu++11 -fno-exceptions -fno-rtti -Os -g3 -Wpointer-arith -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c
+compiler.cpp.flags=-std=gnu++11 -fno-exceptions -fno-rtti -Os -g3 -Wpointer-arith -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -Wno-error=return-type -Wno-error=switch -Wno-error=maybe-uninitialized -c
compiler.S.cmd=xtensa-esp32-elf-gcc
compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
</pre>
== Загрузка прошивки ==
Из Arduino IDE загрузку следует выполнять на скорости 115200.