Latest Espruino build for Esp8266

Posted on
Page
of 8
/ 8
Last Next

  • UPDATE

    For a stable ESP8266 release, download here: espruino.com/Download

    For more detailed ESP8266 info, see the Espruino on ESP8266 page: espruino.com/EspruinoESP8266


    New build:
    s3.voneicken.com/espruino/espruin­o_1v84.tve_master_588d193_esp8266.tgz

    It includes:

    1. 1v84 with improvements towards 1v85
    2. GC fix causing crash after 255 socket connections
    3. Wifi library according to docs (espruino.com/Reference#Wifi)

    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?

  • @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
    
  • Yes, I updated the SDK on s3.voneicken.com

  • 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!

  • Great thanks - something for the weekend!

  • 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 s3.voneicken.com/espruino/espruin­o_1v84.tve_master_9bf51d3_esp8266.tgz

  • Most recent build, but a bit more on the bleeding edge: s3.voneicken.com/espruino/espruin­o_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 and require("ESP8266").setLog(0) to completely disable it. By default it saves 1KB in memory and prints to uart1.

    The Wifi library is documented at espruino.com/Reference#Wifi
    The ESP8266 library is documented at s3.voneicken.com/espruino/functio­ns.html#ESP8266
    General esp8266 port documentation is at espruino.com/EspruinoESP8266
    Sources are at github.com/tve/Espruino

  • 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.

  • 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 :)

  • New build, again teetering on the bleeding edge...
    s3.voneicken.com/espruino/espruin­o_1v84.tve_master_91e353d_esp8266.tgz

    Fixes:

    • any exception causes esp8266 to freeze and then restart
    • server socket end() method does not work

    @Gordon you may want to cherry-pick github.com/tve/Espruino/commit/9­1e353d41f3d260716a39d27349dfc0c39fe06be '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.

  • Thanks! Just done... So that fixes the 'socket.end' bug @JumJum found?

    To be honest I'm winding up for Christmas so will probably leave merging the rest of the stuff until the new year...

  • socket.end bug is fixed by tve changes.

  • The last build above (s3.voneicken.com/espruino/espruin­o_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.

  • New build: s3.voneicken.com/espruino/espruin­o_1v84.tve_master_c8c854e_esp8266.tgz

    Fixes:

    • infinite reboot loop caused by Espressif SDK bug hit when restoring wifi settings.
  • New build: s3.voneicken.com/espruino/espruin­o_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: s3.voneicken.com/espruino/functio­ns.html#t_Wifi

  • New build: s3.voneicken.com/espruino/espruin­o_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:

  • 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

  • Try setting pinMode(D14, 'output'); prior to calling digitalPulse(...); currently this is a requirement on ESP8266.

  • Thank you - this did the trick - now it works again.

  • 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 ?

  • 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.

    github.com/espruino/Espruino/iss­ues/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.

  • 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.

  • 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 ?

  • After more than a week without a build here's finally a new one :-): s3.voneicken.com/espruino/espruin­o_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:

  • @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

About

Latest Espruino build for Esp8266

Posted by Avatar for tve @tve

Actions