-
• #2
@tve, I would like to compile on my own VM.
There was something about using a different SDK, but I cannot find it anymore.
Are these commands still correct ?git clone hhttps://github.com/tve/Espruino.git curl -Ls http://s3.voneicken.com/xtensa-lx106-elf.tgx | tar Jxf - curl -Ls http://s3.voneicken.com/esp_iot_sdk_v1.5.0.tgx | tar Jxf - cd Espruino
-
• #3
Yes, I updated the SDK on s3.voneicken.com
-
• #4
what do you think about including the esp8266 into your official builds starting with the 1v85 release?
Yes - sounds like a good plan to me!
-
• #5
Great thanks - something for the weekend!
-
• #6
I created a new build with what I hope is an improvement to the neopixel driver. It now does a loop "pre-roll" to avoid messing-up the first pixel due to flash instruction fetch delays and it also turns off most interrupts during the neopixel driving. I hope this fixes the first pixel stuck color issue and also perhaps the random messed-up LED problem. It could be that the esp8266 resets if the neopixel string is too long due to turning off interrupts, I don't know...
The build is available at http://s3.voneicken.com/espruino/espruino_1v84.tve_master_9bf51d3_esp8266.tgz -
• #7
Most recent build, but a bit more on the bleeding edge: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_7acd4bc_esp8266.tgz
[Update: this build has a number of problems, please stick to the previous one for now.]
If you're just getting started, perhaps the previous build is a safer bet (all have too little mileage on them to be called safe :-) ).
The most recent build has the following changes:
- 1400 JSvars instead of 1023
- telnet console (use a connection string like espruino.local:23 in the IDE)
- in-memory debug log (use
require("ESP8266").printLog()
to see what just happened andrequire("ESP8266").setLog(0)
to completely disable it. By default it saves 1KB in memory and prints to uart1.
The Wifi library is documented at http://www.espruino.com/Reference#Wifi
The ESP8266 library is documented at http://s3.voneicken.com/espruino/functions.html#ESP8266
General esp8266 port documentation is at http://www.espruino.com/EspruinoESP8266
Sources are at https://github.com/tve/Espruino - 1400 JSvars instead of 1023
-
• #8
Right now the biggest open item I have is to move the debug log and the console memory allocation into JSvars so I can add ~100 more JSvars. I think another item many of you may appreciate is to get mDNS to work.
-
• #9
This is looking great! 1400 vars (16 byte each?) should make a really big difference to the usability of the whole thing.
Can't wait to try the Telnet out either :)
-
• #10
New build, again teetering on the bleeding edge...
http://s3.voneicken.com/espruino/espruino_1v84.tve_master_91e353d_esp8266.tgzFixes:
- any exception causes esp8266 to freeze and then restart
- server socket end() method does not work
@Gordon you may want to cherry-pick https://github.com/tve/Espruino/commit/91e353d41f3d260716a39d27349dfc0c39fe06be 'cause it affects all platforms. I was waiting to change some of the telnet console memory allocation stuff before creating a pull request. If you'd rather have one now I'm happy to do that too.
- any exception causes esp8266 to freeze and then restart
-
• #12
socket.end bug is fixed by tve changes.
-
• #13
The last build above (http://s3.voneicken.com/espruino/espruino_1v84.tve_master_91e353d_esp8266.tgz) so far looks good. One reported problem is an error when saving larger sketches (the
save()
call returns an error). I'll have to look into that tomorrow. -
• #14
New build: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_c8c854e_esp8266.tgz
Fixes:
- infinite reboot loop caused by Espressif SDK bug hit when restoring wifi settings.
- infinite reboot loop caused by Espressif SDK bug hit when restoring wifi settings.
-
• #15
New build: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_9aa07bc_esp8266.tgz
Additions:
- support for mDNS: announces hostname over mDNS, use wifi.setHostname()
- support for SNTP (simple network time protocol), use wifi.setSNTP() and then the regular getTime()
I had to back off to 1300 JSvars due to the static memory gobbled up by mDNS in particular. We'll get back to 1400 soon...
These new functions use the Espressif SDK functionality and have not had much testing time. After running for almost an hour I have not seen SNTP resync, so I'm not sure what it does long term yet...
Documentation as part of the Wifi library: http://s3.voneicken.com/espruino/functions.html#t_Wifi
- support for mDNS: announces hostname over mDNS, use wifi.setHostname()
-
• #16
New build: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_d8dec28_esp8266.tgz
Changes:
- Fixes crash when trying to call nonexistent function (such as
Wifi.getIPAddr()
). - Fixes parameter order in Wifi.setSNTP call.
- Tweaks buffers to get back to 1400 JSvars
Links:
- The Wifi library is documented at http://www.espruino.com/Reference#Wifi
- The ESP8266 library is documented at http://s3.voneicken.com/espruino/functions.html#ESP8266
- General esp8266 port documentation is at http://www.espruino.com/EspruinoESP8266
- Sources are at https://github.com/tve/Espruino
- Flashing the esp8266 tutorial is at https://github.com/tve/EspruinoDocs/blob/master/tutorials/ESP8266_Flashing.md
- Fixes crash when trying to call nonexistent function (such as
-
• #17
I build an array that I submit to remote sockets (RF433) using digitalPulse(D14,1, ps);
It worked fine with 1v83 Copyright 2015 G.Williams.
With 1v84, it seems being interrupted and puts out wrong data.
I have attached the file that works with 1v83.
Maybe you can help me point out a better way, or if it something with 1v84 look into it.
(a few things need to be change in the file to compile with 1v84:
require("wifi")-> "Wifi" and ESP8266.getAddressAsString(ipInfo.ip) ->wifi.getIP().ip
1 Attachment
-
• #18
Try setting
pinMode(D14, 'output');
prior to callingdigitalPulse(...);
currently this is a requirement on ESP8266. -
• #19
Thank you - this did the trick - now it works again.
-
• #20
I moved another project to 1v84.
It runs fine, but I am not able to save() it, I get an ERR>
Is there less flash to save() in with 1v84, can you hint me to debug it ? -
• #21
See this closed issue which implies better compression is on the way. There may be more to it, but it's certainly on the radar.
https://github.com/espruino/Espruino/issues/773
For now if you connect via Wifi using the Web IDE you'll get the full error message. Depending on how far off you are you may be able to make some optimisations to your code which may help.
-
• #22
Also, try adding:
global["\xFF"].history=[];
It's a hack but it removes the command history - something that could have been using memory that would have stopped you saving.
Is there less flash to save() in with 1v84, can you hint me to debug it ?
There's more RAM, but the same flash. Address sizes have increased which means that slightly more RAM might be used for the same code, but I think the main issue is that because there's more RAM, more command history get stored (it's deleted if memory runs low). That means that more flash gets used up when saving, despite the code size being roughly the same.
-
• #23
Thank you again - this did the trick - now it works again.
It compresses from 22400 bytes to 6687, how close am I to the limit ? -
• #24
After more than a week without a build here's finally a new one :-): http://s3.voneicken.com/espruino/espruino_1v84.tve_master_363580f_esp8266.tgz
Changes:
- Changes to 160Mhz for a bit of a performance boost
- Changes I2C timing to just under 400khz
- Fixes hardware SPI (SPI1 device), baud rate is selectable from ~100khz to 4Mhz, default is 100kHz
- Includes save area compression
- OneWire select() always resets the bus first (it's required)
Links:
- The Wifi library is documented at http://www.espruino.com/Reference#Wifi
- The ESP8266 library is documented at http://s3.voneicken.com/espruino/functions.html#ESP8266
- General esp8266 port documentation is at http://www.espruino.com/EspruinoESP8266
- Sources are at https://github.com/tve/Espruino
- Flashing the esp8266 tutorial is at https://github.com/tve/EspruinoDocs/blob/master/tutorials/ESP8266_Flashing.md
- A new but incomplete esp8266 Wifi tutorial is at https://github.com/tve/EspruinoDocs/blob/master/tutorials/ESP8266_WifiUsage.md
- Changes to 160Mhz for a bit of a performance boost
-
• #25
@tve @gordon reference save compression - great work - my stuff fits again. Thanks!
>save(); =undefined Erasing Flash..... Writing............... ERROR: Too big to save to flash (12606 vs 12284 bytes) Deleting command history and trying again... Erasing Flash..... Writing.......... Compressed 22400 bytes to 7810 Checking...
@user59584 suggest you try this build
UPDATE
For a stable ESP8266 release, download here: http://www.espruino.com/Download
For more detailed ESP8266 info, see the Espruino on ESP8266 page: http://www.espruino.com/EspruinoESP8266
New build:
http://s3.voneicken.com/espruino/espruino_1v84.tve_master_588d193_esp8266.tgz
It includes:
I have been able to perform >20'000 http requests using this build, including getting ~20 errors (it's wifi after all) and everything looks fine. One thing to notice is that there is no timeout on connections that don't respond, I will need to look into that. Please let me know if you find issues.
NB: Gordon, assuming this build looks stable to others, what do you think about including the esp8266 into your official builds starting with the 1v85 release?