• Уважаемые посетители сайта esp8266.ru!
    Мы отказались от размещения рекламы на страницах форума для большего комфорта пользователей.
    Вы можете оказать посильную поддержку администрации форума. Данные средства пойдут на оплату услуг облачных провайдеров для сайта esp8266.ru
  • Система автоматизации с открытым исходным кодом на базе esp8266/esp32 микроконтроллеров и приложения IoT Manager. Наша группа в Telegram

Ошибки при сборке примеров в UDK

jcmvbkbc

New member
Unofficial Development Kit for Espressif ESP32 (Windows) - ESP32 Forum
еще пишут про --enable-decimal-float=yes, но где это надо прописать?
Это опция конфигурирования компилятора, её надо указывать при вызове configure для сборки gcc. Но делает она нечто не относящееся к упомянутой проблеме, а именно она включает поддержку типов _Decimal32, _Decimal64 и _Decimal128. См. Decimal Float - Using the GNU Compiler Collection (GCC)
 

nikolz

Well-known member
Установил Версия 2.1.0 от 17.08.2016. на XP.
Делаем так:
1) Очищаем все примеры.
2) Собираем примеры поштучно (через ALL).
------------------------
Получаем Примеры с ошибками:
C+ driver/Adafruit_GFX_AS.cpp
driver/Adafruit_GFX_AS.cpp:668:2: error: floating constant truncated to zero [-Werror=overflow]
float rounding = 0.5;
^
driver/Adafruit_GFX_AS.cpp:670:2: error: floating constant truncated to zero [-Werror=overflow]
float eep = 0.000001;
^
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/5.2.0/../../../../xtensa-lx106-elf/bin/ld.exe: .output/eagle/release/image/eagle.app.v6.out section `.irom0.text' will not fit in region `irom0_0_seg'
collect2.exe: error: ld returned 1 exit status
../Makefile:335: recipe for target '.output/eagle/release/image/eagle.app.v6.out' failed
mingw32-make[1]: *** [.output/eagle/release/image/eagle.app.v6.out] Error 1
mingw32-make[1]: Leaving directory 'C:/Espressif/examples/ESP8266/esp_mesh_sdk_app_light/app'
C:/Espressif/examples/ESP8266/esp_mesh_sdk_app_light/Makefile:283: recipe for target '.subdirs' failed
mingw32-make.exe: *** [.subdirs] Error 2
08:35:53 **** Build of configuration Default for project i2c_bmp180 ****
mingw32-make.exe -f C:/Espressif/examples/ESP8266/i2c_bmp180/Makefile all
CC driver/i2c.c
CC driver/i2c_bmp180.c
driver/i2c_bmp180.c: In function 'BMP180_CalcAltitude':
driver/i2c_bmp180.c:299:2: error: floating constant truncated to zero [-Werror=overflow]
return (int32_t)(pow(((float)MYALTITUDE/44330)+1,5.255F)*pressure);
^
cc1.exe: all warnings being treated as errors
C:/Espressif/examples/ESP8266/i2c_bmp180/Makefile:388: recipe for target 'build/driver/i2c_bmp180.o' failed
mingw32-make.exe: *** [build/driver/i2c_bmp180.o] Error 1
08:36:22 **** Build of configuration Default for project i2c_htu21d ****
mingw32-make.exe -f C:/Espressif/examples/ESP8266/i2c_htu21d/Makefile all
CC driver/i2c.c
CC driver/uart.c
CC user/user_main.c
user/user_main.c: In function 'sensor_timerfunc':
user/user_main.c:79:5: error: floating constant truncated to zero [-Werror=overflow]
temp *= 175.72;
^
user/user_main.c:81:5: error: floating constant truncated to zero [-Werror=overflow]
temp -= 46.85;
^
cc1.exe: all warnings being treated as errors
C:/Espressif/examples/ESP8266/i2c_htu21d/Makefile:388: recipe for target 'build/user/user_main.o' failed
mingw32-make.exe: *** [build/user/user_main.o] Error 1
08:36:50 **** Build of configuration Default for project i2c_sht21 ****
mingw32-make.exe -f C:/Espressif/examples/ESP8266/i2c_sht21/Makefile all
CC driver/i2c.c
CC driver/i2c_sht21.c
driver/i2c_sht21.c: In function 'SHT21_GetVal':
driver/i2c_sht21.c:87:5: error: floating constant truncated to zero [-Werror=overflow]
rv *= 175.72;
^
driver/i2c_sht21.c:89:5: error: floating constant truncated to zero [-Werror=overflow]
rv -= 46.85;
^
cc1.exe: all warnings being treated as errors
C:/Espressif/examples/ESP8266/i2c_sht21/Makefile:388: recipe for target 'build/driver/i2c_sht21.o' failed
mingw32-make.exe: *** [build/driver/i2c_sht21.o] Error 1
c_stdio.c: In function 'cvt':
c_stdio.c:866:9: error: floating constant truncated to zero [-Werror=overflow]
*p-- = to_char((int)((tmp + .01) * 10));
^
c_stdio.c:967:9: error: floating constant truncated to zero [-Werror=overflow]
if (expcnt > prec || (!expcnt && fract && fract < .0001)) {
^
cc1.exe: all warnings being treated as errors
../../Makefile:277: recipe for target '.output/eagle/debug/obj/c_stdio.o' failed
mingw32-make[2]: *** [.output/eagle/debug/obj/c_stdio.o] Error 1
mingw32-make[2]: Leaving directory 'C:/Espressif/examples/ESP8266/nodemcu-firmware/app/libc'
../Makefile:266: recipe for target '.subdirs' failed
mingw32-make[1]: *** [.subdirs] Error 2
mingw32-make[1]: Leaving directory 'C:/Espressif/examples/ESP8266/nodemcu-firmware/app'
C:/Espressif/examples/ESP8266/nodemcu-firmware/Makefile:266: recipe for target '.subdirs' failed
mingw32-make.exe: *** [.subdirs] Error 2
esptool2.c: В функции «CreateHeaderFile»:
esptool2.c:214:2: предупреждение: format «%x» expects argument of type «unsigned int», but argument 3 has type «Elf32_Addr» [-Wformat=]
fprintf(outfile, "const uint32 entry_addr = 0x%08x;\r\n", elf->header.e_entry);
^
esptool2.c:235:4: предупреждение: format «%x» expects argument of type «unsigned int», but argument 4 has type «Elf32_Addr» [-Wformat=]
name, sect->address, name, sect->size, name);
^
esptool2.c:235:4: предупреждение: format «%d» expects argument of type «int», but argument 6 has type «Elf32_Word» [-Wformat=]
 

CHERTS

Moderator
Команда форума
На Windows 7/10 ошибка сборки только для примера esp_mesh_sdk_app_light, на всех остальных все в норме, я проверял перед публикацией релиза.
Поставьте уже в конце то концов Win7 и не мучайтесь с WinXP.
 

nikolz

Well-known member
На Windows 7/10 ошибка сборки только для примера esp_mesh_sdk_app_light, на всех остальных все в норме, я проверял перед публикацией релиза.
Поставьте уже в конце то концов Win7 и не мучайтесь с WinXP.
1) У меня стоит win10 а на XP я не мучаюсь - это у меня стенд.
2) Можете объяснить причем здесь винда?
3) Проверять надо не все вместе а по отдельности. Для этого уберите галочку автоматической сборки, очистите все проекты и соберите индивидуально каждый из указанных выше примеров. И будет Вам счастье.
 

CHERTS

Moderator
Команда форума
Я не знаю как вам еще показать что у меня все нормально, смотрите видео:

Win 7 x64, на этой же машине я собирал UDK 2.1.0


C 3:00 я собираю выборочно несколько проектов (nodemcu и rboot не стал показывать, комп тормозной, долго это), ни на одном из перечисленных вами, кроме esp_mesh_sdk_app_light нет ошибок сборки.
С 5:33 я очистил все проекты как Вы говорили и выборочно собрал 3 из списка - проблем нет.

P.S. Я верю, что у Вас может быть проблема сборки, но я не могу добиться её появления у себя.

P.P.S. esp_mesh_sdk_* примеры удалены из UDK т.к. они не поддерживаются производителем.
 

nikolz

Well-known member
Как вариант, возможно это связано с тем, что у Вас 64бит ОС. Так как в предыдущих Ваших сборках в некоторых своих проектах я получал сообщения про 64 бит слова. Сейчас точно не помню. Еще были ошибки с указанием строк, которых не существовало в моем проекте.
Я просто убрал все проекты кроме своего и ошибки исчезли.
Полагаю, что это как-то связано со средой еклипса.
 

Victor

Administrator
Команда форума

sharikov

Active member
Я не знаю как вам еще показать что у меня все нормально, смотрите видео:
Демо проекты не собираются.
UDK Версия 2.1.0 от 17.08.2016
Хост: Win 7 64bit

Результаты:
Код:
C:\Espressif\examples\ESP8266\i2c_bmp180>make
CC driver/i2c.c
CC driver/i2c_bmp180.c
driver/i2c_bmp180.c: In function 'BMP180_CalcAltitude':
driver/i2c_bmp180.c:299:2: error: floating constant truncated to zero [-Werror=o
verflow]
  return (int32_t)(pow(((float)MYALTITUDE/44330)+1,5.255F)*pressure);
  ^
cc1.exe: all warnings being treated as errors
make: *** [build/driver/i2c_bmp180.o] Error 1
Код:
C:\Espressif\examples\ESP8266\esp8266_ili9341>make
C+ driver/Adafruit_GFX_AS.cpp
driver/Adafruit_GFX_AS.cpp:668:2: error: floating constant truncated to zero [-W
error=overflow]
  float rounding = 0.5;
  ^
driver/Adafruit_GFX_AS.cpp:670:2: error: floating constant truncated to zero [-W
error=overflow]
  float eep = 0.000001;
  ^
make: *** [build/driver/Adafruit_GFX_AS.o] Error 1
 

Alex

Member
Снес WinXP поставил Win 7 64. Поставил все пакеты. Eclipse Neon. Примеры собираются. Но ошибка с
"floating constant truncated to zero" осталась. Так что видимо дело не операционке.

 

nikolz

Well-known member
Снес WinXP поставил Win 7 64. Поставил все пакеты. Eclipse Neon. Примеры собираются. Но ошибка с
"floating constant truncated to zero" осталась. Так что видимо дело не операционке.
Полагаю, что проблема в том, что UDK собран под WIN10.
И эта ошибка исчезает только под WIN10. (проверено)
 

Ers

New member
@nikolz можно попросить куда-нибудь выложить архив папки MinGW, проведем эксперимент
 

Alex

Member
МиниГВ не причем. Копирую папку Espressif с 209 версией из WinXP в Win 7. Папку с версией 210 переименовываю. И все нормально. Ошибки нет.
 
Сверху Снизу