Some advise for compiling last releases?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Some advise for compiling last releases?

#1 Post by moelski » 31 Aug 2016, 07:15

Hi @all,

I´m new to the ESPEasy topic and have to say it´s a really impressive project. Great work !!

Since I use FHEM for my home automatisation I need to compile the R126 version. There are some new FHEM related topics I wan´t to try.
Today I started some tests compiling ESPEasy R126. But I almost get errors.
If I use IDE Version > 1.6.5 I get something like "was not declared in this scope".
If I use IDE Version 1.6.5 I get errors with the ArduinoJson Lib (even if I use the latest version from the ArduinoJson github).

So it would be great if you can give some advice on how to compile the latest release.
Which IDE must be used (I assume 1.6.5) und which Libs have to be used (in which version)?

regards
Dominik
regards
Dominik

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Some advise for compiling last releases?

#2 Post by costo » 31 Aug 2016, 10:33

For me it works with these libraries and IDE 1.6.5:

ArduinoJson (version ArduinoJson-v5.6.4 https://github.com/bblanchon/ArduinoJson)
IRremoteESP8266 (https://github.com/sebastienwarin/IRremoteESP8266)
LiquidCrystal_I2C (https://github.com/marcoschwartz/LiquidCrystal_I2C)
PubSubClient (https://github.com/knolleary/pubsubclie ... s/tag/v2.6)

Also important to upgrade to ESP8266 core 2.3.0 with this URL for the boardmanager:
http://arduino.esp8266.com/stable/packa ... index.json

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#3 Post by moelski » 31 Aug 2016, 13:22

Thx for the information.
I will try that this evening.

And you can compile R126 without any errors?

Dominik
regards
Dominik

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Some advise for compiling last releases?

#4 Post by costo » 31 Aug 2016, 13:49

Yes I can compile all releases including R126 .
I only get a warning about the LiquidCrystal_I2C library which I ignore.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#5 Post by moelski » 31 Aug 2016, 19:49

Well I tried the JSON Lib 5.6.4. But still got this error:

Code: Select all

C:\Users\Dominik\AppData\Local\Temp\build541259997608530700.tmp\ESPEasy.cpp.o: In function `UdpContext::connect(ip_addr, unsigned short)':
C:\Users\Dominik\Desktop\arduino-1.6.5-r5\portable\packages\esp8266\hardware\esp8266\2.3.0\libraries\ArduinoJson/include/ArduinoJson/Internals/../JsonBuffer.hpp:119: undefined reference to `handle_upload_post()'
collect2.exe: error: ld returned 1 exit status
IDE is 1.6.5-RC5 with ESP8266 Toolchain 2.3.0

Any ideas?

Dominik
regards
Dominik

User avatar
nonflammable
Normal user
Posts: 42
Joined: 09 Mar 2016, 22:19
Location: Poland

Re: Some advise for compiling last releases?

#6 Post by nonflammable » 31 Aug 2016, 20:57

1. Clean install Arduino IDE (zip) v1.6.11
2. http://arduino.esp8266.com/stable/packa ... index.json v2.3.0 (install: https://github.com/esp8266/Arduino#inst ... ds-manager)
3. Libraries copied from http://www.esp8266.nu/downloads/ESPEasy_R120.zip to Arduino IDE folder\libraries
4. Github source https://github.com/ESP8266nu/ESPEasy
5. Rename ESPEasy-master folder to ESPEasy
Compiled without errors/warnings.

Please check step 3 on your computer.
Last edited by nonflammable on 17 Sep 2016, 20:23, edited 1 time in total.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#7 Post by moelski » 01 Sep 2016, 06:45

Ok I will check that this evening.
But that was exactly what I have done ...
Get back with results soon. Thx so far
regards
Dominik

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#8 Post by moelski » 10 Sep 2016, 14:54

Hi @all,

in the meantime I can compile the GIT sources even with 1.6.11 (ESPEsay R 129).
But it can only be done if you disable the SPIFFS Feature.
As soon as you anable SPIFFS it results in the known error:

Code: Select all

undefined reference to `handle_upload_post()'
I got the same error (SPIFFS enabled) if I use Arduino IDE 1.6.5-r5.
Without SPIFFS there are no Problems.

regards
Dominik
regards
Dominik

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Some advise for compiling last releases?

#9 Post by costo » 10 Sep 2016, 16:44

If I understand the feature of SPIFFS well, ESPEasy is not 100% functional without SPIFFS.
Because all the settings are saved in SPIFFS which are read again after a reboot.

So I will not use IDE 1.6.5 RC5 or 1.6.11.
Just using 1.6.5 until a new version of ESPEasy forces me to use a newer Arduino IDE release .

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#10 Post by moelski » 10 Sep 2016, 17:41

Hi !
Just using 1.6.5 until a new version of ESPEasy forces me to use a newer Arduino IDE release .
Ok, but where can you download 1.6.5. If you look at arduino.cc there is only version 1.6.5 RC5. :shock:
regards
Dominik

Martinus

Re: Some advise for compiling last releases?

#11 Post by Martinus » 10 Sep 2016, 18:57

moelski wrote:I got the same error (SPIFFS enabled) if I use Arduino IDE 1.6.5-r5.
Without SPIFFS there are no Problems.

regards
Dominik
SPIFFS hasn't been tested for a while and some code needs to be fixed and added to use SPIFFS again. It will be fixed in R130.
Although i would currently not recommend using SPIFFS (you may well be the only one using it...)

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: Some advise for compiling last releases?

#12 Post by costo » 11 Sep 2016, 01:06

moelski wrote:Hi !
Just using 1.6.5 until a new version of ESPEasy forces me to use a newer Arduino IDE release .
Ok, but where can you download 1.6.5. If you look at arduino.cc there is only version 1.6.5 RC5. :shock:
Just did a download of 1.6.5 R5 and it seems to be exactly the same as 1.6.5 when compiling both give a file of the same size.
So apparently you are talking about the SPIFFS found in the source code :#define FEATURE_SPIFFS while I was talking about the SPIFFS found in the tools section of the IDE under : Flash Size.

So a misunderstanding from me. I have never tried to change the setting from false to true of the FEATURE_SPIFFS because just above that section you read:
// DO NOT CHANGE ANYTHING BELOW THIS LINE

So why are you trying to change the setting to true ? I do not see the benefit of this even if it worked.

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#13 Post by moelski » 11 Sep 2016, 06:43

So why are you trying to change the setting to true ?
I´m interested in coding and testing ;) And I would like to test SPIFFS since I never have it done before.
Anyway ... Martinus made it clear :)

So the results are as follow ...
Compiling with 1.6.11 is no problem until you have the correct libs from the R120 package, the 2.3.0 ESP toolchain and SPIFFS is not touched 8-)

greetings
Dominik
regards
Dominik

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Some advise for compiling last releases?

#14 Post by tozett » 14 Sep 2016, 08:54

moelski wrote: Compiling with 1.6.11 is no problem until you have the correct libs from the R120 package, the 2.3.0 ESP toolchain and SPIFFS is not touched 8-)
i can confirm this.
i still wondering, why SPIFFS is not used more in ESPeasy.
on the 4M esp's there is lot of room for some web-server files.

as far as i saw in the espeasy-source, there are only config.txt (as bin) and rules.txt on the SPIFFS.
(i must be another thread, if it is now SPIFFS....)

may check here, what could be done:

WEBSERVER on SPIFFS (i tested it working fine!:::)
https://bitbucket.org/bachi76/esp8266-framework/src

https://github.com/esp8266/Arduino/blob ... ile-system
http://www.insign.ch/blog/2016/01/29/io ... rettyPhoto

Martinus

Re: Some advise for compiling last releases?

#15 Post by Martinus » 15 Sep 2016, 08:08

SPIFFS is a real memory hog! Takes more than 3k RAM.
This 3k can be spend on much more usefull stuff than SPIFFS (ESP Easy is not a webserver, it's a wireless sensor)

But if you want to use it, you can enable it. I may work (again) with the latest release.

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Some advise for compiling last releases?

#16 Post by tozett » 15 Sep 2016, 08:21

i agree with everything on the esp-development here.

a little "but": there may be slightly different use-cases for the espeasy.
i have all my 2 needed sensors on my installed espeasy-3 (out of 14) running.
and as far as i see, there are 27k ram left.
so i can easyly give 3k for an shining web-interface.

and also like you: i dont really need the web-interace :? . i have the espeasy as a sensor. exactly as you said.
i dont pack all possible sensors on one module. but why not have a shiny web-gui? its an option.

and SPIFFS can be an option (where RAM is left over.)
thankfully you build the option in, so we have it already in the beloved espeasy.

with the coming esp32 there will maybe more room for this,
may we see upcoming use-cases for SPIFFS wich we will like ?!?
in the linked demo the webserver looked good, but overall, same as you, i like the sensor-capability most on the espeasy
:)
Attachments
free-ram.png
free-ram.png (17.66 KiB) Viewed 18759 times

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#17 Post by moelski » 15 Sep 2016, 08:37

Hi !
there may be slightly different use-cases for the espeasy.
Correct :)

In my case I like to use ESPEsay as an actor. I know that is not the main purpose of ESPEasy, but I hope/think it will work.
I´d like to controll my self build living room light with ESPEasy.
That lamp uses RGP stripes (WS2812) and some LED lights which need to be dimmable.

Using SPIFFS allows me to serve a small webpage with a color selector for the RGP Stripe. I know this could also be done by embedding the javascript code.
But using SPIFFS would make life much easier ;)

Anyway ... this gets a little bit offtopic :)
But thank you guys for ESPEasy and the SPIFFS possibility :)

Dominik
regards
Dominik

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#18 Post by moelski » 18 Sep 2016, 08:42

Hi !

Just a small note about SPIFFS here.
I build R131 with SPIFFS enabled. Works like a charm :ugeek: Thx for fixing that !!

And it seems to be very easy to get my "RGB-lamp" project setup ...
Attached two first test screens ;)
Loading javascript from a webpage is also no problem for SPIFFS. Excellent 8-)

But I will open a new topic in Projects for that.
Attachments
SPIFFS RGB Color Picker.PNG
SPIFFS RGB Color Picker.PNG (13.47 KiB) Viewed 18602 times
SPIFFS Filelist.PNG
SPIFFS Filelist.PNG (19.4 KiB) Viewed 18602 times
regards
Dominik

adrianmihalko
Normal user
Posts: 51
Joined: 15 Sep 2016, 00:20

Re: Some advise for compiling last releases?

#19 Post by adrianmihalko » 18 Sep 2016, 20:42

Hi,

I am trying to compile last release. The source is compiling fine, uploading is done without error.

But in serial window I see errors:

Code: Select all

ets Jan  8 2013,rst cause:2, boot mode:(3,0)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v09826c6d
~ld
��U
PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Reboot count: 2
FLASH: Erase Sector: 100
FLASH: Erase Sector: 101
It's a Wemos D1 Mini. I tried both flash size: 4M (3M SPIFFS), 4M (1M SPIFFS).

A possible workaround:

In Arduino IDE -> SKETCH -> EXPORT COMPILED BINARY -> rename .bin to ESPEasy_R131_4096.bin. Then using flashcmd.bat I am able to upload and run latest Esp Easy.

Question: why it's not uploading correctly trough Arduino IDE?

User avatar
beic
Normal user
Posts: 142
Joined: 18 Aug 2016, 18:19

Re: Some advise for compiling last releases?

#20 Post by beic » 18 Sep 2016, 23:02

Hi there,

Which option should i choose for compiling the firmware sketch for ESP-01 1M (black) and also for ESP-07 and ESP-12 4M (1M or 3M SPIFFS)?

Thank you! ;)

Image

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#21 Post by moelski » 19 Sep 2016, 04:30

Hi !

Code: Select all

Which option should i choose for compiling the firmware sketch for ESP-01 1M (black) and also for ESP-07 and ESP-12 4M (1M or 3M SPIFFS)?
That depends on your needs ;)

Personally I use an ESP12E (nodemcu 1.0) which has 4MB of flash. And I use 3MB für SPIFFS.
That means you have 1MB left for the program (like ESPEasy).
The Arduino IDE gives me this result:

Code: Select all

Sketch uses 444,277 bytes (42%) of program storage space. Maximum is 1,044,464 bytes.
In other words ... My Program can be 1MB in size max and I have 3MB for SPIFFS.

For your ESP-01 ... Well at the moment you can use 1M / 512k. ESPEasy should fit into the flash.
But if you need some extras you could get into storage trouble. In that case you switch back to 1M / 256K

Hope that helps ...

Dominik
regards
Dominik

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Some advise for compiling last releases?

#22 Post by tozett » 19 Sep 2016, 09:29

i think you are free to choose the size you want for a filesystem (SPIFFS),
on which are by default only 3 small files...

http://www.esp8266.nu/index.php/Tutoria ... and_upload

User avatar
beic
Normal user
Posts: 142
Joined: 18 Aug 2016, 18:19

Re: Some advise for compiling last releases?

#23 Post by beic » 19 Sep 2016, 09:48

tozett wrote:i think you are free to choose the size you want for a filesystem (SPIFFS),
on which are by default only 3 small files...
http://www.esp8266.nu/index.php/Tutoria ... and_upload
Good starter information provided, Thank you for that! ;)

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Some advise for compiling last releases?

#24 Post by tozett » 23 Sep 2016, 19:52

it sould be a new SPIFFS thread, or better in the wiki,
but the FLASH layout (and space for SPIFFS) is clearly shown here:

good overview:

http://esp8266.github.io/Arduino/versio ... ystem.html

found more details here:
https://github.com/pellepl/spiffs/blob/ ... /TECH_SPEC

active branch?
https://github.com/pellepl/spiffs

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Some advise for compiling last releases?

#25 Post by tozett » 28 Sep 2016, 09:35

moelski wrote: Loading javascript from a webpage is also no problem for SPIFFS. Excellent 8-)
But I will open a new topic in Projects for that.
any chance to see your SPIFFS code from this project?
:D

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#26 Post by moelski » 28 Sep 2016, 12:34

Hi !
any chance to see your SPIFFS code from this project?
Well I think this get´s a little bit offtopic :roll:

But for sure I can show my code for that. But let me prepare a useable demo (or just finish my Candle Output ;) ).

In general you have to enhance the Webserver addHeader Funktion with your JavaScript.
And then the webserver code handles the rest ... You have to enable SPIFFS of course.
The drawback is that in my current version the JavaScript is embedded into all pages.
That´s not so funny ... As soon as I have fixed that I can post some information.

Dominik
regards
Dominik

tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

Re: Some advise for compiling last releases?

#27 Post by tozett » 29 Sep 2016, 10:03

cool. thank.
you open a new topic SPIFFS?

i had some testing code working, serving files from spiffs.
if not found, than the usual way on ESPeasy.

while bug-hunting i found a great example for an already working best-looking gui with SPIFFS.
worth to have a look?
https://github.com/esp8266/Arduino/issu ... -214698254

now jumping out this thread to your topic SPIFFS...
:D

User avatar
moelski
Normal user
Posts: 161
Joined: 31 Aug 2016, 06:33
Location: Germany - NRW
Contact:

Re: Some advise for compiling last releases?

#28 Post by moelski » 29 Sep 2016, 20:32

Here is the new SPIFFS thread:
http://www.esp8266.nu/forum/viewtopic.php?f=6&t=2069

Dominik
regards
Dominik

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests