Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile using Core Version: 2.4.0 and Adafruit_PWMServoDriver.h #4096

Closed
electrical-pro opened this issue Jan 5, 2018 · 1 comment
Closed

Comments

@electrical-pro
Copy link

Basic Infos

Hardware

Hardware: NodeMCU 1.0 ESP-12E
Core Version: 2.4.0

Description

Can't compile using Core Version: 2.4.0
But it compiles without any problem using core version: 2.4.0-rc2 or core version: 2.3.0

Settings in IDE

Module: NodeMCU 1.0 ESP-12E
Flash Size: 4MB
CPU Frequency: 160Mhz
Flash Mode: ?qio?
Flash Frequency: ?40Mhz?
Upload Using: ?OTA / SERIAL?
Reset Method: ?ck / nodemcu?

Sketch

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();



void setup(void) {
  Wire.begin(5, 14);
  Wire.setClock(100000);


  pwm.begin();
  pwm.setPWMFreq(1600);
}

void loop(void) {              
  
}

Debug Messages

Arduino: 1.8.5 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 160 MHz, 4M (1M SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 256000"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\DEYMOS\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\DEYMOS\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\DEYMOS\Documents\Arduino\libraries -fqbn=esp8266:esp8266:nodemcuv2:CpuFrequency=160,FlashSize=4M1M,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,UploadSpeed=256000 -ide-version=10805 -build-path C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778 -warnings=none -build-cache C:\Users\DEYMOS\AppData\Local\Temp\arduino_cache_844963 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.esptool.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.12 -prefs=runtime.tools.mkspiffs.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\0.2.0 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2 -verbose C:\Users\DEYMOS\Desktop\SmartHomeV3_Stable\SmartHomeV3_Stable.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\DEYMOS\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\DEYMOS\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\DEYMOS\Documents\Arduino\libraries -fqbn=esp8266:esp8266:nodemcuv2:CpuFrequency=160,FlashSize=4M1M,LwIPVariant=v2mss536,Debug=Disabled,DebugLevel=None____,UploadSpeed=256000 -ide-version=10805 -build-path C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778 -warnings=none -build-cache C:\Users\DEYMOS\AppData\Local\Temp\arduino_cache_844963 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.esptool.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.12 -prefs=runtime.tools.mkspiffs.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\0.2.0 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2 -verbose C:\Users\DEYMOS\Desktop\SmartHomeV3_Stable\SmartHomeV3_Stable.ino
Using board 'nodemcuv2' from platform in folder: C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0
Using core 'esp8266' from platform in folder: C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0
Detecting libraries used...
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire\Wire.cpp" -o "nul"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp" -o "nul"
Generating function prototypes...
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11  -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\sketch\SmartHomeV3_Stable.ino.cpp.o"
Compiling libraries...
Compiling library "Wire"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire\Wire.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\libraries\Wire\Wire.cpp.o"
Compiling library "Adafruit-PWM-Servo-Driver-Library-master"
"C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/lwip2/include" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include" "-IC:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=160000000L -DLWIP_OPEN_SRC -DTCP_MSS=536   -DARDUINO=10805 -DARDUINO_ESP8266_NODEMCU -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_NODEMCU"  -DESP8266 "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\variants\nodemcu" "-IC:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire" "-IC:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master" "C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp" -o "C:\Users\DEYMOS\AppData\Local\Temp\arduino_build_945778\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp.o"
C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp: In member function 'void Adafruit_PWMServoDriver::setPin(uint8_t, uint16_t, bool)':

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: error: no matching function for call to 'min(uint16_t&, int)'

   val = min(val, 4095);

                      ^

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note: candidates are:

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)

     min(initializer_list<_Tp> __l, _Compare __comp)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4226:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'short unsigned int'

   val = min(val, 4095);

                      ^

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:62:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)

     min(initializer_list<_Tp> __l)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algo.h:4221:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'short unsigned int'

   val = min(val, 4095);

                      ^

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)

     min(const _Tp& __a, const _Tp& __b, _Compare __comp)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int')

   val = min(val, 4095);

                      ^

In file included from c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\algorithm:61:0,

                 from C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:240,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master/Adafruit_PWMServoDriver.h:22,

                 from C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:18:

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)

     min(const _Tp& __a, const _Tp& __b)

     ^

c:\users\deymos\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:193:5: note:   template argument deduction/substitution failed:

C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master\Adafruit_PWMServoDriver.cpp:89:22: note:   deduced conflicting types for parameter 'const _Tp' ('short unsigned int' and 'int')

   val = min(val, 4095);

                      ^

Using library Wire at version 1.0 in folder: C:\Users\DEYMOS\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\libraries\Wire 
Using library Adafruit-PWM-Servo-Driver-Library-master at version 1.0.1 in folder: C:\Users\DEYMOS\Documents\Arduino\libraries\Adafruit-PWM-Servo-Driver-Library-master 
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

@devyte
Copy link
Collaborator

devyte commented Jan 5, 2018

This is because this repo is now using the std:;min std::max functions instead of #defines. This gives the hint:
error: no matching function for call to 'min(uint16_t&, int)'
val = min(val, 4095);
^

So val is uint16_t while 4095 is int, and comparing those two types implicitly is a no-no. This is precisely why the C++ standard implemented the std::min|max templated functions.
The correct way would be to do one of:

  • declare val as int instead of uint16_t
  • cast val to int explicitly when passing the arg (e.g.: min((int)val, 4095)
  • cast 4095 to uint16_t when passing the arg (e.g.: min(val, (uint16_t)4095) )
  • declare a static const uint16_t somename = 4095 and use somename as arg

I suggest opening an issue in their repo asking that they fix their code.

Closing due to bug in 3rd party lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants