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

Compilation error during build on latest (beta/dev) esphome #2

Open
T-REX-XP opened this issue Aug 13, 2019 · 9 comments
Open

Compilation error during build on latest (beta/dev) esphome #2

T-REX-XP opened this issue Aug 13, 2019 · 9 comments

Comments

@T-REX-XP
Copy link

Hello. I have got a problem with compilation firmware for wemos d1 board, when your module is imported.
At first I have fixed all includes.But still have another errors. Could you please fix this module for using with latest version of esphome.

Thanks.

@asmfreak
Copy link
Owner

Could you copy/paste the errors here?
I'm thinking about creating a pull req to esphome from this repo. I'll need some time to polish the code.
Link esphome/feature-requests#14

@T-REX-XP
Copy link
Author

here is the compilation issue:

INFO Reading configuration /config/esphome/test2.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d /config/esphome/test2
Processing test2 (framework: arduino; platform: [email protected]; board: d1_mini)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 1.8.0 > WeMos D1 R2 & mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: toolchain-xtensa 1.40802.0 (4.8.2), tool-esptool 1.413.0 (4.13), framework-arduinoespressif8266 2.20402.4 (2.4.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for Update library in registry
Warning! Library `{'requirements': None, 'name': 'Update'}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'requirements': None, 'name': 'Update'}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 27 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESPAsyncTCP> 1.2.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS>
|   |-- <ESP8266WiFi> 1.0
|-- <SPI> 1.0
Compiling /data/test2/.pioenvs/test2/src/main.cpp.o
Archiving /data/test2/.pioenvs/test2/lib4d9/libESP8266WiFi.a
Compiling /data/test2/.pioenvs/test2/lib009/ESPAsyncTCP_ID305/AsyncPrinter.cpp.o
Compiling /data/test2/.pioenvs/test2/lib009/ESPAsyncTCP_ID305/ESPAsyncTCP.cpp.o
Compiling /data/test2/.pioenvs/test2/lib009/ESPAsyncTCP_ID305/ESPAsyncTCPbuffer.cpp.o
In file included from src/main.cpp:12:0:
src/max7219grid.hpp:7:1: error: 'ESPHOME_NAMESPACE_BEGIN' does not name a type
 ESPHOME_NAMESPACE_BEGIN
 ^
src/max7219grid.hpp:69:1: error: 'ESPHOME_NAMESPACE_END' does not name a type
 ESPHOME_NAMESPACE_END
 ^
src/max7219grid.hpp:226:1: error: 'ESPHOME_NAMESPACE_END' does not name a type
 ESPHOME_NAMESPACE_END
 ^
Compiling /data/test2/.pioenvs/test2/lib009/ESPAsyncTCP_ID305/SyncClient.cpp.o
*** [/data/test2/.pioenvs/test2/src/main.cpp.o] Error 1
========================== [ERROR] Took 10.28 seconds ==========================

@saikek
Copy link

saikek commented Oct 6, 2019

Same for me (including pull request), building for ESP8266 - Nodemcu V3

INFO Generating C++ source...
INFO Compiling app...
INFO Running:  platformio run -d father_clock
Processing father_clock (framework: arduino; platform: [email protected]; board: nodemcuv2)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 27 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS>
|   |-- <ESP8266WiFi> 1.0
|-- <ESPAsyncTCP> 1.2.0
|   |-- <ESP8266WiFi> 1.0
Compiling .pioenvs/father_clock/src/main.cpp.o
Compiling .pioenvs/father_clock/lib5f6/ESP8266WiFi/CertStoreBearSSL.cpp.o
Compiling .pioenvs/father_clock/lib5f6/ESP8266WiFi/ESP8266WiFi.cpp.o
Compiling .pioenvs/father_clock/lib5f6/ESP8266WiFi/ESP8266WiFiAP.cpp.o
Compiling .pioenvs/father_clock/lib5f6/ESP8266WiFi/ESP8266WiFiGeneric.cpp.o
In file included from src/main.cpp:11:0:
src/max7219grid.hpp:7:1: error: 'ESPHOME_NAMESPACE_BEGIN' does not name a type
ESPHOME_NAMESPACE_BEGIN
^
src/max7219grid.hpp:68:1: error: 'ESPHOME_NAMESPACE_END' does not name a type
ESPHOME_NAMESPACE_END
^
src/max7219grid.hpp:225:1: error: 'ESPHOME_NAMESPACE_END' does not name a type
ESPHOME_NAMESPACE_END
^
*** [.pioenvs/father_clock/src/main.cpp.o] Error 1

@saikek
Copy link

saikek commented Oct 7, 2019

Apparently, now you need to use

namespace esphome {
}

instead

@T-REX-XP
Copy link
Author

T-REX-XP commented Oct 7, 2019

Is it resolve compilation issue?

@saikek
Copy link

saikek commented Oct 7, 2019

nope... I've tried few tweaks, but my C++ level is not enough to resolve this issue.
Also I need some animations, so most likely at this moment I would grab pieces of code from different places (NTP time sync, MAX7129 display, BMP280 sensor).

https://github.com/MKme/Wemos-D1-Subscriber-Counter-MAX7219-LED-Matrix/blob/master/D1MiniSubscriberCounterMAX2719/D1MiniSubscriberCounterMAX2719.ino

looks promising for what I want.

@saikek
Copy link

saikek commented Oct 15, 2019

I've ended up using https://github.com/Qrome/marquee-scroller for my specific task if anyone is looking for a library / binary.

@bcanning84
Copy link

Has anyone solved the compilation errors that come up during the build? Also building for ESP8266, Nodemcu V3.
As above getting the errors on lines:
'ESPHOME_NAMESPACE_BEGIN'
'ESPHOME_NAMESPACE_END'
As above I have tried tweaking and using 'namespace esphome {}' but had no joy, my C++ knowledge is definitely not up to scratch.
It would be great to see this as a component in ESPHome eventually!

@lotharbach
Copy link

My pull request #4 fixes all compilation issues and works with the scrolling vertical lines example. I don't think the functions to print text or the time are currently working.

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

5 participants