![e1e2c6014291069b98fab265bc5b5b4.png](//file1.elecfans.com/web2/M00/FE/0E/wKgaomaYgt2AW5JvAAEY9ZJL-m0277.png)
最近再弄esp32加lvgl+freertos+gui guider,在arduino2.3版本中配置,配置tft espi库后编译示例文件发生以下报错:
In file included from c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.h:96,
from c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:16:
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.c: In function 'void dc_callback(spi_transaction_t*)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:203:22: error: 'GPIO' was not declared in this scope
203 | #define DC_D GPIO.out_w1ts = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.c:807:28: note: in expansion of macro 'DC_D'
807 | if ((bool)spi_tx->user) {DC_D;}
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.c:808:9: note: in expansion of macro 'DC_C'
808 | else {DC_C;}
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::begin_tft_write()':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:247:22: error: 'GPIO' was not declared in this scope
247 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS); GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:80:5: note: in expansion of macro 'CS_L'
80 | CS_L;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::begin_nin_write()':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:247:22: error: 'GPIO' was not declared in this scope
247 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS); GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:92:5: note: in expansion of macro 'CS_L'
92 | CS_L;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::end_tft_write()':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:248:22: error: 'GPIO' was not declared in this scope
248 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:106:7: note: in expansion of macro 'CS_H'
106 | CS_H;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::end_nin_write()':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:248:22: error: 'GPIO' was not declared in this scope
248 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:121:7: note: in expansion of macro 'CS_H'
121 | CS_H;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::begin_tft_read()':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:247:22: error: 'GPIO' was not declared in this scope
247 | #define CS_L GPIO.out_w1tc = (1 << TFT_CS); GPIO.out_w1tc = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:141:5: note: in expansion of macro 'CS_L'
141 | CS_L;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::end_tft_read()':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:248:22: error: 'GPIO' was not declared in this scope
248 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:161:7: note: in expansion of macro 'CS_H'
161 | CS_H;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::writecommand(uint8_t)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:984:3: note: in expansion of macro 'DC_C'
984 | DC_C;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::writedata(uint8_t)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:203:22: error: 'GPIO' was not declared in this scope
203 | #define DC_D GPIO.out_w1ts = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:1047:3: note: in expansion of macro 'DC_D'
1047 | DC_D;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'uint8_t TFT_eSPI::readcommand8(uint8_t, uint8_t)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:1084:3: note: in expansion of macro 'DC_C'
1084 | DC_C; tft_Write_8(0xD9);
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'virtual uint16_t TFT_eSPI::readPixel(int32_t, int32_t)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:248:22: error: 'GPIO' was not declared in this scope
248 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:1247:3: note: in expansion of macro 'CS_H'
1247 | CS_H;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::readRectRGB(int32_t, int32_t, int32_t, int32_t, uint8_t*)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:248:22: error: 'GPIO' was not declared in this scope
248 | #define CS_H GPIO.out_w1ts = (1 << TFT_CS)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:2257:3: note: in expansion of macro 'CS_H'
2257 | CS_H;
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::setWindow(int32_t, int32_t, int32_t, int32_t)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:3480:5: note: in expansion of macro 'DC_C'
3480 | DC_C; tft_Write_8(TFT_CASET);
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'void TFT_eSPI::readAddrWindow(int32_t, int32_t, int32_t, int32_t)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:3556:3: note: in expansion of macro 'DC_C'
3556 | DC_C; tft_Write_8(TFT_CASET);
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp: In member function 'virtual void TFT_eSPI::drawPixel(int32_t, int32_t, uint32_t)':
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:3756:7: note: in expansion of macro 'DC_C'
3756 | DC_C; tft_Write_8(TFT_CASET);
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:3763:7: note: in expansion of macro 'DC_C'
3763 | DC_C; tft_Write_8(TFT_PASET);
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\Processors/TFT_eSPI_ESP32_S3.h:202:22: error: 'GPIO' was not declared in this scope
202 | #define DC_C GPIO.out_w1tc = (1 << TFT_DC)
| ^~~~
c:\Users\DELL\Documents\Arduino\libraries\TFT_eSPI\TFT_eSPI.cpp:3769:3: note: in expansion of macro 'DC_C'
3769 | DC_C; tft_Write_8(TFT_RAMWR);
| ^~~~
exit status 1
Compilation error: exit status 1
看样子就是tft库没配置好,我看了那些报错文件,我也不清楚哪里的错,网上也搜不到,哪位大佬知道配置出什么问题了吗吗!!!