DFBJS_fE3qU 发表于 2020-5-15 23:19:12

esp8266编译出错

esp8266编译smartlight示例出错


Arduino:1.8.12 (Windows 10), 开发板:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

C:\Program Files (x86)\Arduino\libraries\WiFi\src\utility\wifi_drv.cpp: In static member function 'static uint8_t WiFiDrv::getEncTypeNetowrks(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\WiFi\src\utility\wifi_drv.cpp:451:10: warning: converting to non-pointer type 'uint8_t {aka unsigned char}' from NULL [-Wconversion-null]

   return NULL;

          ^

C:\Program Files (x86)\Arduino\libraries\WiFi\src\utility\wifi_drv.cpp: In static member function 'static int32_t WiFiDrv::getRSSINetoworks(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\WiFi\src\utility\wifi_drv.cpp:476:10: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]

   return NULL;

          ^

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp: In function 'void tone(uint8_t, unsigned int, long unsigned int, uint8_t)':

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp:5:25: error: 'ledcRead' was not declared in this scope

   if (ledcRead(channel)) {

                         ^

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp:9:31: error: 'ledcAttachPin' was not declared in this scope

   ledcAttachPin(pin, channel);

                               ^

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp:11:36: error: 'ledcSetup' was not declared in this scope

   ledcSetup(channel, frequency, 8);

                                    ^

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp:14:27: error: 'ledcWrite' was not declared in this scope

         ledcWrite(pin, 128);

                           ^

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp: In function 'void noTone(uint8_t, uint8_t)':

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp:22:22: error: 'ledcDetachPin' was not declared in this scope

   ledcDetachPin(pin);

                      ^

C:\Users\hp\Documents\Arduino\libraries\DFRobot_Aliyun\Tone32.cpp:23:25: error: 'ledcWrite' was not declared in this scope

   ledcWrite(channel, 0);

                         ^

exit status 1
为开发板 NodeMCU 1.0 (ESP-12E Module) 编译时出错。

在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。

pATAq 发表于 2020-5-16 00:09:26

建议你提供更详细的信息,比如用的什么板子,加载的什么库,ino代码。
我看你的报错信息是采用了DFRobot_Aliyun库,搜索资料显示是Gravity:Starter Kit for Aliyun IoT 阿里云IoT入门套件,但是该库适用于FireBeetle Board-ESP32主板,而你的是esp8266,没猜错的话这就是原因所在。
页: [1]
查看完整版本: esp8266编译出错