I tried to compile using your directions below but I have error that I can't fgure out, could you help me with this please
First I would like to say that I am new to the ESP world and second I am new to compiling of firmware and ... english is not my primary language so please bare with me...
I'm trying to build a firmware that would include the PZEM004T plugin, I installed the Atom environment together with the PlateformIO and I have been able to build the vanilla ESPeasy bin file, not without issues (I had errors with the some IR that I removed from the build to fix) but I got it to build a firmware.
Then, I dowloaded the PZEM004T.io thast i added in the src directory and I also dowloaded the PZEM004.ZIP (containing the librairies, .h files etc) that I put in the lib directory and also download espsoftwareserial-3.2.3 in wich I modified the library.json as you mentionned and tried building a normal 4096 file and I got the following errors:
.pioenvs\normal_ESP8266_4096\lib298\libespsoftwareserial-3.2.3.a(SoftwareSerial.o): In function `sws_isr_0()':
SoftwareSerial.cpp:(.iram.text+0xd0): multiple definition of `sws_isr_0()'
.pioenvs\normal_ESP8266_4096\lib076\libSoftwareSerial.a(ESPeasySoftwareSerial.o):ESPeasySoftwareSerial.cpp:(.iram.
text+0xd4): first defined here
.pioenvs\normal_ESP8266_4096\lib298\libespsoftwareserial-3.2.3.a(SoftwareSerial.o): In function `sws_isr_1()':
SoftwareSerial.cpp:(.iram.text+0xe8): multiple definition of `sws_isr_1()'
.pioenvs\normal_ESP8266_4096\lib076\libSoftwareSerial.a(ESPeasySoftwareSerial.o):ESPeasySoftwareSerial.cpp:(.iram.
text+0xec): first defined here
.pioenvs\normal_ESP8266_4096\lib298\libespsoftwareserial-3.2.3.a(SoftwareSerial.o): In function `sws_isr_2()':
SoftwareSerial.cpp:(.iram.text+0x100): multiple definition of `sws_isr_2()'
.pioenvs\normal_ESP8266_4096\lib076\libSoftwareSerial.a(ESPeasySoftwareSerial.o):ESPeasySoftwareSerial.cpp:(.iram.
text+0x104): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pioenvs\normal_ESP8266_4096\firmware.elf] Error 1
thanks for any help
aleph0 wrote: ↑08 Nov 2017, 10:03 Hi, and thanks for making this nice plugin !
As I had to do some searching to finally compile and install it, here is a all-in-one summary of what needs to be done :
1/ Install and configure platform.io according to the instructions here :
https://www.letscontrolit.com/wiki/inde ... Platformio
then
https://www.letscontrolit.com/wiki/inde ... platformio
2/ Download the source tree from here :
https://github.com/letscontrolit/ESPEas ... .0.0-dev12 (or later version as there are being developed
3/ Download the plugin source from here and copy it in the main source
https://github.com/papperone/ESPEasyPlu ... M-004T.ino
4/ Download PZEM004T library from here and copy it in the lib subdirectory of the main source
https://github.com/olehs/PZEM004T
5/ Download SofwareSerial library in version 3.2.3 from here and copy it in the lib subdirectory of the main source
https://github.com/plerup/espsoftwarese ... /tag/3.2.3
6/ Update the library.json file that came from the softwareserial library with the following content :(version was missing and platforms mispelled )Code: Select all
{ "name": "EspSoftwareSerial", "version": "3.2.3", "keywords": [ "serial", "io", "softwareserial" ], "description": "Implementation of the Arduino software serial for ESP8266.", "repository": { "type": "git", "url": "https://github.com/plerup/espsoftwareserial" }, "frameworks": "arduino", "platforms": "espressif8266" }
After that, I was able to compile espeasy with the plugin and send it to the esp via OTA