Arduino编译esp32时仅添加第三方库就报错-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 543|回复: 2

[未解决] Arduino编译esp32时仅添加第三方库就报错

[复制链接]
发表于 2022-8-19 16:33 | 显示全部楼层 |阅读模式

附报错信息,望朋友们给出帮助。





Arduino:1.8.12 (Windows 10), 开发板:"ESP32 Dev Module, 80MHz, 921600, None"


In file included from D:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/include/driver/driver/timer.h:21:0,


                 from C:\Users\holle\Documents\Arduino\libraries\RGB_matrix_Panel\RGBmatrixPanel.cpp:67:


D:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/include/soc/soc/timer_group_struct.h:194:19: error: 'timg_dev_t TIMERG1', declared using anonymous type, is used but never defined [-fpermissive]


extern timg_dev_t TIMERG1;


                   ^


D:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/include/soc/soc/timer_group_struct.h:192:3: note: 'typedef volatile struct<anonymous> timg_dev_t' does not refer to the unqualified type, so it is not used for linkage


} timg_dev_t;


   ^


D:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/include/soc/soc/timer_group_struct.h:193:19: error: 'timg_dev_t TIMERG0', declared using anonymous type, is used but never defined [-fpermissive]


extern timg_dev_t TIMERG0;


                   ^


D:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/sdk/include/soc/soc/timer_group_struct.h:192:3: note: 'typedef volatile struct<anonymous> timg_dev_t' does not refer to the unqualified type, so it is not used for linkage


} timg_dev_t;


   ^


exit status 1
为开发板 ESP32 Dev Module 编译时出错。


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


报错截图

报错截图
发表于 2022-8-19 20:29 | 显示全部楼层
你查一下这个库是否兼容 ESP32
 楼主| 发表于 2022-8-19 21:29 | 显示全部楼层
Zoologist 发表于 2022-8-19 20:29
你查一下这个库是否兼容 ESP32

安了esp32库之后,又报这个错误,按照别人的方法试了下,还是不行,望指教

D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'void Adafruit_SPIDevice::transfer(uint8_t*, size_t)':
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:133:31: error: no matching function for call to 'SPIClass::transfer(uint8_t*&, size_t&)'
     _spi->transfer(buffer, len);
                               ^
In file included from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.h:9:0,
                 from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:67:13: note: candidate: uint8_t SPIClass::transfer(uint8_t)
     uint8_t transfer(uint8_t data);
             ^
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:67:13: note:   candidate expects 1 argument, 2 provided
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'bool Adafruit_SPIDevice::write(const uint8_t*, size_t, const uint8_t*, size_t)':
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:335:61: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       _spi->transferBytes(prefix_buffer, nullptr, prefix_len);
                                                             ^
In file included from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.h:9:0,
                 from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:70:10: note:   initializing argument 1 of 'void SPIClass::transferBytes(uint8_t*, uint8_t*, uint32_t)'
     void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
          ^
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:338:47: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       _spi->transferBytes(buffer, nullptr, len);
                                               ^
In file included from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.h:9:0,
                 from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:70:10: note:   initializing argument 1 of 'void SPIClass::transferBytes(uint8_t*, uint8_t*, uint32_t)'
     void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
          ^
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp: In member function 'bool Adafruit_SPIDevice::write_then_read(const uint8_t*, size_t, uint8_t*, size_t, uint8_t)':
D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:429:59: error: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
       _spi->transferBytes(write_buffer, nullptr, write_len);
                                                           ^
In file included from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.h:9:0,
                 from D:\Program Files (x86)\arduino1\libraries\Adafruit_BusIO\Adafruit_SPIDevice.cpp:1:
D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\SPI\src/SPI.h:70:10: note:   initializing argument 1 of 'void SPIClass::transferBytes(uint8_t*, uint8_t*, uint32_t)'
     void transferBytes(uint8_t * data, uint8_t * out, uint32_t size);
          ^
"WiFi.h" 对应多个库
已使用: D:\Program Files (x86)\arduino1\hardware\espressif\esp32\libraries\WiFi
未使用:D:\Program Files (x86)\arduino\libraries\WiFi
exit status 1
为开发板 ESP32F 编译时出错。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 00:40 , Processed in 0.196323 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表