本帖最后由 花开千树 于 2021-2-23 11:29 编辑
如题,近几天在学习的过程中看了很多帖子,我的理解是用USB转TLL给ESP-01S刷AT固件(blinker示例里的AT_Firmware_WiFi),然后在UNO板子里刷示例里的blinker_AUTO->AUTO_WiFi,最后UNO给ESP-01S供电且互连。 首先第一个问题是不知道以上这个有没有理解错。
然后第二个问题就是给esp-01S刷固件的问题,配置好环境,用最新的8266_package_2.7.4,blinker库放在文档\arduino\libraries内。我刷一个简单开关ESP-01S上的灯的没有问题(证明USB转TLL的接线没问题),但是刷AT_Firmware_WiFi却不行,后来试下单纯验证(不是上传)会出错如下:
- ////////示例里的AT_Firmware_WiFi
- #define BLINKER_AT_MQTT
- #include <Blinker.h>
- void setup()
- {
- Blinker.begin();
- }
- void loop()
- {
- Blinker.run();
- }
复制代码
- ////////以下是编译时的出错信息
- In file included from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTTAT.h:10:0,
- from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:116,
- from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\examples\Blinker_AT_Firmware\AT_Firmware_WiFi\AT_Firmware_WiFi.ino:48:
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTTAT.h: In member function 'virtual char* BlinkerMQTTAT::token()':
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerMQTTAT.h:79:66: error: 'MQTT_KEY_MQTT_AT' was not declared in this scope
- char * token() { if (!isMQTTinit) return ""; else return MQTT_KEY_MQTT_AT; }
- ^
- In file included from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTTAT.h:11:0,
- from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:116,
- from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\examples\Blinker_AT_Firmware\AT_Firmware_WiFi\AT_Firmware_WiFi.ino:48:
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In member function 'void BlinkerApi::log(const String&)':
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6447:9: error: expected ';' before 'data'
- data += BLINKER_F(",");
- ^
- In file included from C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/Arduino.h:243:0,
- from sketch\AT_Firmware_WiFi.ino.cpp:1:
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:44:251: error: expected primary-expression before ')' token
- #define PSTRN(s,n) (__extension__({static const char __c[] __attribute__((__aligned__(n))) __attribute__((section( "".irom0.pstr." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "", "aSM", @progbits, 1 #"))) = (s); &__c[0];}))
- ^
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/WString.h:38:76: note: in definition of macro 'FPSTR'
- #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
- ^
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:48:19: note: in expansion of macro 'PSTRN'
- #define PSTR(s) PSTRN(s,PSTR_ALIGN)
- ^
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/WString.h:39:34: note: in expansion of macro 'PSTR'
- #define F(string_literal) (FPSTR(PSTR(string_literal)))
- ^
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Adapters/../Blinker/BlinkerDebug.h:13:29: note: in expansion of macro 'F'
- #define BLINKER_F(s) F(s)
- ^
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6447:17: note: in expansion of macro 'BLINKER_F'
- data += BLINKER_F(",");
- ^
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:44:251: error: expected ';' before ')' token
- #define PSTRN(s,n) (__extension__({static const char __c[] __attribute__((__aligned__(n))) __attribute__((section( "".irom0.pstr." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "", "aSM", @progbits, 1 #"))) = (s); &__c[0];}))
- ^
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/WString.h:38:76: note: in definition of macro 'FPSTR'
- #define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
- ^
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:48:19: note: in expansion of macro 'PSTRN'
- #define PSTR(s) PSTRN(s,PSTR_ALIGN)
- ^
- C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/WString.h:39:34: note: in expansion of macro 'PSTR'
- #define F(string_literal) (FPSTR(PSTR(string_literal)))
- ^
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Adapters/../Blinker/BlinkerDebug.h:13:29: note: in expansion of macro 'F'
- #define BLINKER_F(s) F(s)
- ^
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6447:17: note: in expansion of macro 'BLINKER_F'
- data += BLINKER_F(",");
- ^
- In file included from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/BlinkerESPMQTTAT.h:11:0,
- from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:116,
- from C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\examples\Blinker_AT_Firmware\AT_Firmware_WiFi\AT_Firmware_WiFi.ino:48:
- C:\Users\KIN\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:6448:17: error: '_msg' was not declared in this scope
- data += _msg;
- ^
- "Ticker.h" 对应多个库
- 已使用: C:\Users\KIN\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\Ticker
- 未使用:C:\Users\KIN\Documents\Arduino\libraries\Ticker
- exit status 1
- 为开发板 Generic ESP8266 Module 编译时出错。
复制代码
以上两个问题,希望有大佬赐教一下。。。
|