Latest Espruino build for Esp8266 #5652
Replies: 2 comments
-
Posted at 2015-12-18 by JumJum @tve, I would like to compile on my own VM.
Posted at 2015-12-18 by tve Yes, I updated the SDK on s3.voneicken.com Posted at 2015-12-18 by @gfwilliams
Yes - sounds like a good plan to me! Posted at 2015-12-18 by Ollie Great thanks - something for the weekend! Posted at 2015-12-19 by tve 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... Posted at 2015-12-20 by tve 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:
The Wifi library is documented at http://www.espruino.com/Reference#Wifi Posted at 2015-12-20 by tve 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. Posted at 2015-12-21 by @gfwilliams 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 :) Posted at 2015-12-22 by tve New build, again teetering on the bleeding edge... Fixes:
@gfwilliams you may want to cherry-pick tve/Espruino@91e353d '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. Posted at 2015-12-22 by @gfwilliams 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... Posted at 2015-12-22 by JumJum socket.end bug is fixed by tve changes. Posted at 2015-12-23 by tve 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 Posted at 2015-12-24 by tve New build: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_c8c854e_esp8266.tgz Fixes:
Posted at 2015-12-24 by tve New build: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_9aa07bc_esp8266.tgz Additions:
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 Posted at 2015-12-30 by tve New build: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_d8dec28_esp8266.tgz Changes:
Links:
Posted at 2016-01-05 by jsbaekke 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. Attachments: Posted at 2016-01-05 by Ollie Try setting Posted at 2016-01-05 by jsbaekke Thank you - this did the trick - now it works again. Posted at 2016-01-06 by jsbaekke I moved another project to 1v84. Posted at 2016-01-06 by Ollie 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. 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. Posted at 2016-01-07 by @gfwilliams Also, try adding: It's a hack but it removes the command history - something that could have been using memory that would have stopped you saving.
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. Posted at 2016-01-09 by jsbaekke Thank you again - this did the trick - now it works again. Posted at 2016-01-10 by tve 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:
Links:
Posted at 2016-01-10 by Ollie @tve @gordon reference save compression - great work - my stuff fits again. Thanks!
@user59584 suggest you try this build Posted at 2016-01-10 by tve excellent! Posted at 2016-01-18 by tve The last build has been pretty stable, it seems. I just produced a new build with the latest mainline changes and a fix for neopixels at 160Mhz. This is my "release candidate" for v1.85: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_74fc4d7_esp8266.tgz Changes:
Links:
Posted at 2016-01-18 by tve Alas yesterday's build had a couple of small bugs. Here's an updated build: http://s3.voneicken.com/espruino/espruino_1v84.tve_master_f35ac96_esp8266.tgz Changes:
Links:
Posted at 2016-01-18 by JumJum @tve, did you have the time to test changes around E.memoryArea for this build ? Posted at 2016-01-19 by tve Nope, I haven't Posted at 2016-01-21 by petrynchyn After the firmware 1q84.tve_master_f35ac96 this code started working with failures, problem only with DHT module.
terminal window:
Posted at 2016-01-27 by ChrisZ Hello; Posted at 2016-01-27 by profra @chrisz I am using this to flash 1MB ESP-01...
Posted at 2016-02-08 by fuzzy Hello everyone, espruino_1v84.tve_master_74fc4d7_esp8266 but in every case the ide's console spits out a lot of garbage and the module seems to reboot every few seconds. I solved my problem reflashing over the saved data code area as per given instruction on the esp8266 page of espruino. Sorry for the noise... Posted at 2016-02-08 by AlexOwen @fuzzy try flashing it at 115200, I've found that usually works. Also dont have the espruino IDE connected when flashing with esptool. Posted at 2016-02-09 by fuzzy Tanks @AlexOwen, I also think that my front panel USB3 port are not working properly, because when i connected the cable to the rear ports it stopped sending garbage on the console... Posted at 2016-02-26 by @gfwilliams Builds are now available from the Espruino Download PageYou can get up and running quickly:
Replace Note: If you have a non-512kB board (pretty much anything that's not an ESP01) then this won't be ideal as it's slower and you can't do OTA updates (see the next post) - however it should work and should get you started quite quickly. If you want to do it properly have to follow the real instructions. Posted at 2016-02-26 by tve If you use the above 512KB firmware on a module with a flash chip that is larger you will see a warning about the flash chip config being incorrect when you reset Espruino. You can ignore the warning, it's just telling you that the configuration you chose (512KB) doesn't match you flash chip. Also, the 512KB firmware will run with the flash chip configured to 40Mhz, while the flash chips larger than 512KB are (almost?) all capable of running at 80Mhz, so you will see some speed impact due to this (it's less than 2x, though). The complete flash instructions configure the flash chip to 80Mhz. Posted at 2016-03-13 by user63056 Hi, Is it possible to make clock stretching support for I2c communication. Posted at 2016-03-14 by @gfwilliams Best to use the bug tracker for requests like this: https://github.com/espruino/Espruino However ESP8266 uses a software I2C implementation, so it should be possible to change it if you wanted. Posted at 2016-03-16 by tve Sure could be implemented, start here: https://github.com/espruino/Espruino/blob/a2fb33f01af8bc2a33f9d86a176eb18ecf50635a/targets/esp8266/jshardware.c#L882-L926 Posted at 2016-03-16 by DrAzzy Wondering same - clock stretching is a rather uncommonly used feature of I2C. Posted at 2016-03-19 by user63214 Great work on this port! It works great so far. I'm building a solder reflow oven and it has worked out well. But now I want to build a web ui to control it. I can't use websockets as I get the error below. I'm on 1.85 from the download page on an ESP-12
Posted at 2016-03-19 by @MaBecker @user63214 at the moment crypto is not part of the official build, some folks are working on this. watch espruino/Espruino#807 Posted at 2016-03-19 by Wilberforce Hi, I've written the crypto module as js module, so you can in the esp... http://forum.espruino.com/conversations/276175/?offset=25#comment12817146 Posted at 2016-03-20 by user63214 @MaBecker Will do! Thanks! @wilberforce I was trying to do the same thing. Glad I saw your response before I spent all night hacking on it. Thanks a ton, that is a great solution for now. Looks like my ESP8266 / Espruino equipped reflow toaster will get a web ui tonight! :) Posted at 2016-03-20 by davem Thanks so much for this, I can confirm that it works on the WeMosD1 board, see pic of board (NOTE: I couldn't get NodeMcu working on this board!).
Attachments: Posted at 2016-04-08 by MrBambix Hello all, Hmm seem to be having the some issue with garbage showing up on the console or prompt in the web ide. Flashed my Amica R2 esp8266 with no problems. But doesnt seem to be working: Connected
Any ideas or tips appreciated. Thanks Posted at 2016-04-08 by @allObjects What about the UART settings, for example baud rate? Posted at 2016-04-08 by MrBambix Hello, Thanks for the reply, i double checked flashed with 115200 and also running the webIDE with 115200. On a putty telnet session its just a frozen prompt.. regards, Posted at 2016-04-08 by MrBambix allObjects, just to update now I don't get the garbled prompt anymore. This is after a reset of the board, but now the cursor is is frozen and nothing can be typed at the prompt. Also on connecting its not showing the regular espruino things Posted at 2016-04-08 by @allObjects So you are saying: output is ok, but no input accepted? Posted at 2016-04-09 by @yerpj I already had this kind of garbage when using a serial port. In my case, the device (which was not an Espruino nor an ESP8266) had a very bad clock reference, and the baudrate was not totally aligned with one of the 'standards' baudrates. Just to be sure, could you try to connect with putty with , by example, a baudrate like 115000, 114000, 115500, 116000 ? Posted at 2016-04-13 by pbuyle I've the same issue as @MrBambix after flashing on a NodeMCU devkit 0.9 (ESP-12 with 4Mb flash) with
When connecting with the IDE, I got a frozen terminal in the left-hand panel with only
In the IDE log, I find this
Note: my board look exactly like this Posted at 2016-04-13 by @gfwilliams As I said on the post you made on GitHub, I'd be pretty sure it's baud rate - try 115200. I'll close the GitHub issue - the forum is the best place for these sorts of questions. Posted at 2016-04-13 by Wilberforce Are you on Windows? Sometimes I find after flashing you need to unplug the USB port and plug back in again. After a flash, I usually have to do a few connect/disconnects in the ide as well. Posted at 2016-04-13 by JumJum One more on windows: Posted at 2016-04-13 by pbuyle Indeed, using baud rate 115200 and the board works. Thanks. Posted at 2016-04-17 by tve It looks like it's time for a new experimental build! This build moves a ton of symbol table stuff to flash, freeing up gobs of RAM. The result it 1600 jsvars (instead of 1400) and >10KB of free heap ensuring you don't run out of memory if you run STA+AP and have multiple sockets open. This build is experimental for those of you that want to play with the bleeding edge or to help test this. For a stable firmware please download an official build! The build is available at: http://s3.voneicken.com/espruino/espruino_1v85.tve_master_cee7141_esp8266.tgz Changes:
Posted at 2016-04-17 by creationix With this latest build, I can't get my chip to boot. It is stuck in a reboot look with the message I'm using an Adafruit feather esp8266 (ESP-12mod) and using the esp-12 settings in the README. Posted at 2016-04-17 by virtualcodewarrior I can confirm that the same thing happens when I build it from source using the latest github version when running on an ESP8266-ESP12-F. In my case it loops with this output :
Any help would be appreciated. Posted at 2016-04-17 by tve Ah, I saw the same but thought it was because I was upgrading from an ancient version. Init code stored in flash has become incompatible and there is not a good check for that. The solution is to erase all flash (erase_flash command to esptool.py) and flash from scratch. Posted at 2016-04-17 by tve @gfwilliams: is it time to increment FLASH_MAGIC? I'm not sure why the saved code becomes incompatible... Posted at 2016-04-17 by @gfwilliams The instructions could just say to erase the flash when uploading - or IMO there should be a 1M image that overwrote everything, which would be a whole load easier for newbies. I don't think it should be the binary's job to detect whether it's been uploaded correctly. I think the issue is that some pointers to functions get stored in the code, and those move around so you can pretty much guarantee that code won't work between builds... Even using a slightly different compiler version or flags would probably produce incompatible binaries with exactly the same source code - so basically you'd have to write the CRC of the binary along with FLASH_MAGIC, which seems pretty crazy. But if you've changed the number of variables from 1400 to 1600 then chances are that's your problem :) Also, if you use Posted at 2016-04-17 by tve And the new build is http://s3.voneicken.com/espruino/espruino_1v85.tve_master_66fde09_esp8266.tgz Posted at 2016-04-17 by virtualcodewarrior I can confirm the latest build boots, after erasing the flash. Thanks. Posted at 2016-04-18 by Ollie @tve 1600! :) Posted at 2016-04-18 by Ollie Flashed fine. Anything in particular to test? Posted at 2016-04-18 by CrashingDutchman This seems to have solved the issue @virtualcodewarrior reported above for me too. However, after doing a dump() (after doing a 'Send to Espruino' in the WebIDE) I see the original code that is available right after flash below my own code:
How do I get rid of that? Posted at 2016-04-19 by @gfwilliams That's where Espruino tries to reconstruct the state of the pins from what they've been set to - it's not actually code as such, it's just added by I'm surprised the pins state us input_pullup - maybe Posted at 2016-04-19 by tve Input_pullup is the default state the esp8266 gpio pins are put into at reset and Espruino doesn't change that. Posted at 2016-04-19 by @gfwilliams Thanks - so either they need changing to be inputs, or more likely jsinteractive needs changing right here as it assumes that pins are normally just inputs. Perhaps Posted at 2016-04-21 by AlexOwen Those extra 200 jsvars are a lifesaver. Amazing work. Thanks! I have a couple of sensors running 24/7 and I'll feedback any problems I find (if any). One of the old builds was resetting after around 48-72 hours of being on, but without any large non-volatile memory to log to I don't know if it's the build or my code not handling an exception. Posted at 2016-04-21 by @MaBecker running some test on espruino_1v85.tve_master_cee7141_esp8266 without any errors.
Posted at 2016-04-26 by Jordan That firmware rocks, no more LUA \o/ !!! It will make it awesome for IoT with batteries projects. Posted at 2016-04-26 by @gfwilliams Deep sleep here: https://github.com/espruino/Espruino/blob/master/targets/esp8266/jswrap_esp8266.c#L442 It's in the current master build. It's not normal Espruino deep sleep though - all state will be lost as it's like a hard reset. Posted at 2016-04-30 by Will @gfwilliams - safe to assume it requires "reset" to be connected to GPIO16 to work? Posted at 2016-05-02 by @gfwilliams Yes, I think so - you'd have to ask the people that did it though :) Posted at 2016-05-02 by hansamann Hi @tve, I am currently exploring scripting languages on my adafruit huzzah feather and the 1v84 you've posted above flashes nicely and a first test with screen worked as expected. It is pretty close to the latest 1v85, which would run on an espruino pico for example. So does this mean there are no major issues to expect? For the espruino WebIDE, it seemded to connect but then no keyboard input was possible. I had to use screen. Is this a known error or are there other reasons the web ide does not work with a esp8266? Thx! Posted at 2016-05-02 by Wilberforce @hansamann Posted at 2016-05-02 by DrAzzy @hansamann - v84? You're using an old version, @tve has a newer one here (page 3 of this thread - direct link to the post in the thread I'm talking about here): http://forum.espruino.com/comments/12929332/ The default baud rate used for the ESP8266 is different from what's used for other boards, if you're connecting via wired serial. I usually connect via wired serial using some other serial client, set up the wifi, and then connect with IDE over the network, though you can change the baud rate the IDE uses. Posted at 2016-05-04 by @gfwilliams What do we think about just changing the baud rate to 9600? So it's slower, but it's not that bad. It seems to be an extremely common problem - made worse by the fact that every other Espruino device uses 9600 baud for compatibility with Bluetooth modules. Posted at 2016-05-04 by @gfwilliams Just to add: I think most people that complained about it being too slow actually use Telnet now? Also, using 9600 means that users could potentially use the headphone jack hack to set up WiFi credentials if they didn't have a USB-TTL connector (it's far fetched I know). Posted at 2016-05-04 by Wilberforce The 115200 speed is good for me - especially if you add a few models that need to be uploaded. The issue I'm aware of is after a firmware update. There is also the option of connecting the esp8266 to your wifi network, and using wiflash {ip-address}:88 to flash the firmware or adding the ip to the communications part of the web ide to avoid these issues. Posted at 2016-05-04 by @gfwilliams
Yes, it's fine once you figure it out. It's all the people who post here going 'It's not working!' :) Posted at 2016-05-04 by tve ooops, redundant post, deleted... Posted at 2016-05-04 by tve If it always resets to 9600 baud that would definitely be something I would not like at all and that would cause me to make my separate builds. Aside from being totally inconvenient (everything esp8266 is 115200 baud for me) it would totally suck when the device resets and then I can't see what it prints out because it comes out at 9600 baud and not the 115200 that my serial port would be set to. Posted at 2016-05-04 by tve NB: it might help to put a prominent note on the main esp8266 documentation page. It didn't occur to me at the time. Posted at 2016-05-04 by DrAzzy I tend to favor 9600, since that's what all the other espruino boards default to. I haven't connected to an esp8266 running espruino over serial except to flash Espruino and set the wifi info.... (which I do with a separate application, because I don't want to change the setting on the IDE and then forget and get all confused when I try to use a Pico again). The telnet console access is awesome, I never realized how much better it would be. Posted at 2016-05-05 by @gfwilliams That's the problem I guess - it's whether you use Espruino every day, or ESP8266 every day :) There's always Posted at 2016-05-05 by Wilberforce Does the ide know what board it is connect to? Can this be used for a preferential baud rate - default to 9600 unless the board.py specifies something different? I guess it's a catch 22 situation here... Would about using the last board connected setting? Posted at 2016-05-05 by @gfwilliams Nope, it could maybe read the USB ID, but that's just the type of USB-UART chip, which will be the same for many boards. It's up to the board really. I guess it could store the baud rate in the WiFi settings area, so firmware updates wouldn't change it? That might be more sensible.
Well, that's kind of what we have. It remembers the baud rate setting, so if you connected to something last and it worked than you're sorted. But that doesn't help new users. The IDE could ask the first time it connects, but honestly I find it hard to see why every single Espruino user (ESP8266 or not) should be inconvenienced because of this. Posted at 2016-05-30 by user65089 I have downloaded what I think is the latest version, and is currently testing the Wifi-part of it. Here is an extract of my test
The wifi.connect doesn't seem to ever respond Anyone tried the ESP8266 as a client ? Posted at 2016-05-30 by user65089 I had the same problem until I flashed the correct firmware on the ESP8266. Posted at 2016-06-02 by hansamann Thx @drazzy for the direct link. It would be great if these files would soon be under a link like latest_esp8266.zip :-) I am flashing the build in a moment. It would be amazing to get the espruino web ide and with a wemo esp8266 to work. It would be a $2.5 dev board, perfect for schools and kids. thx for your help! Posted at 2016-06-02 by hansamann Thx so much @user65089, @drazzy and @gfwilliams. I've changed to baudrate to 115200, something I've done naturally with other apps like Serial Term (Chrome OS). I think it belongs mentioned in red letters in the esp8266 espruino docs somewhere! Now all is fine. I'd have one more generic question(s): what is the current state of the build & will it be officially supported in the future, too? Are all the basics working (PINs, PWN, libraries?)... I am mainly looking for a dirt cheap dev board for school workshops. That's why I've bought the esp8266 based WeMo boards. With the help of Espruino I can now use the kick-ass Chrome OS based Web IDE for teaching javascript. The espruini Web IDE is really core, I cannot mention it more. The kids at school all have Chrome OS based laptops, they are cheaper and maintenance/admin is not such a hazzle. Thx! Posted at 2016-06-03 by @gfwilliams As far as I know:
Unless there's a way I can actually make money that pays for the support I give on ESP8266 it won't be 'officially' supported. Having said that everyone's doing a pretty good job of supporting it regardless. Posted at 2016-06-09 by hansamann @gfwilliams would you consider a kickstarter? MicroPython just did it and I am sure many here would give a few dollars to support an even better implementation. I'd love see that! Posted at 2016-06-09 by Ollie He's done Kickstarter successfully already - twice now I think. Posted at 2016-06-10 by hansamann Yep @ollie @gfwilliams I know - I think I also funded both and goth both boards at home. I am just saying that I would be more than willing to fund a 3rd one specifically for advancing the esp8266 (or upcoming esp boards) build. Posted at 2016-06-10 by Wilberforce Or how about the dual core 512kb ram with Bluetooth module Posted at 2016-06-10 by Wilberforce Posted at 2016-06-10 by Stev While I was away a bit and you're luckily still at it, will there be some support for any 8266ex board like Olimex' MOD-WIFI-ESP8266-DEV or anything cheap with more GPIO than the 2 of set standard -01 boards? Not sure if these questions help, though :) Edit: If the 32 should really be available that soon, the question might be useless. If not, and a usable board is six months away, I would still pose it that way. Posted at 2016-06-10 by Ollie @wilberforce I didn't realise ESP32 has started to ship! Now who's going to port Espruino :) Edit: Scrolled down for spec and realise a pre-order. Still "expected June" Posted at 2016-06-10 by DrAzzy @stev - You should be able to flash it to any ESP board, unless they did something particularly weird to it. People are even getting it to run on these wifi enabled outlet things (see sonoff thread). Lots of people use the NodeMCU boards or clones thereof (though they have a different set of pin numbering - no clue why they took it upon themselves to do that). It works fine on plain old dirt shit cheap ESP-12Es - I use it on ESP-12's mounted on these protoboards, (which I sell ;-) ): The ESP-12's do need a breakout board of some sort - the castelated pads are 2mm pitch, not 0.1". There are a number of "just a breakout board" type boards available. Posted at 2016-06-10 by Stev @drazzy: Nice tinkering board. I'll have a closer look at the possible components. Though I somehow want everything "smaller!" these days. Not sure how to get there though without doing a new board every time... I thought there might not be support for all IO pins or the 8266ex' serial memory. If that's the case though, I'll happily go and buy some (tiny ;) board. Thanks Posted at 2016-06-11 by DrAzzy Yeah - smaller pretty much means a separate board for each purpose, and I routinely end up making purpose-specific boards for that reason. Those are more for one-off's and prototyping - though I've made a few ESP8266 APA102 controllers on those boards. All of the normal IO pins are supported (except the ones used for communicating with the flash, of course). I don't think pin 16 (the one that's used for the sleep wake thing) is supported yet? I haven't been following that aspect, since I'm using them in stationary applications. Posted at 2016-06-14 by @gfwilliams As always, those look like pretty cool prototype boards! With an Espruino on ESP8266 crowdfunding campaign like the Micropython one, I'd get some money up front for ESP8266 development work, but actually it looks like the major work is done, and what's left is really just tweaking and documenting the minor niggles. Problem is, after that I'm going to have a bunch of ESP8266 users asking for support for the next few years, and there's not really any way I can afford to provide that since I wouldn't be making anything after the initial crowdfunding. I'd feel bad ignoring something that I'd kind of endorsed by doing the KickStarter. If anyone's got ideas for actually making money sustainably from ESP8266 I'd love to hear it (although a separate thread is probably a better place!). About the only thing I can think of is actually offering a paid web service (so ESP8266s can securely connect to an online Web IDE and be programmed from anywhere). While IoT services seem like a big thing at the moment, I wonder how many people would actually be willing to pay... After all, one of the big ESP8266 draws is it's price. Posted at 2016-06-15 by Kolban When the ESP32 starts to ship, I for one will happily volunteer to port to ESP32. I am still waiting on details but believe that the ESP32 will be core based on RTOS ... that will take a bit of effort. But after the work done last year on getting Espruino running on the ESP8266, it shouldn't be too awful. And with the upping from 96KBytes to 512KBytes of RAM ... we should be in GREAT shape for larger apps. Posted at 2016-06-15 by DrAzzy @gfwilliams - answer is obviously esp8266 powered robots programmed in Javascript to mug people and remit the proceeds to you. I'm not sure how to get revenue stream either. I mean, other than doing what you're doing with espruino wifi (imo you should promote the fact that one can run espruino on the esp8266 of the Espruino wifi - thus allowing you to offload more network tasks to the esp8266, if that is appropriate for your application) The fact that esp8266 's biggest appeal is possibly that it's dirt shit cheap makes things harder.... @Kolban The ESP32 looks truly amazing, I think they let the esp8266 hacking community write the feature list or somethinf. I reckon it will have to be more expensive by a good margin to get all that functionality in - I can see that being a really attractive platform. Posted at 2016-06-22 by tve New build from espruino master but using SDK 1.5.4 and having 1600 JS vars: http://s3.voneicken.com/espruino/espruino_1v85.tve_master_124390c_esp8266.tgz BTW: I would appreciate if this thread didn't get hijacked by completely unrelated stuff... Posted at 2016-06-22 by JumJum @tve, @gfwilliams
Could you please give me some help to better understanding ? Posted at 2016-06-22 by Wilberforce I think @tve is experimenting with the new sdk 1.5.4, and if all ok it will get rolled into the mainline build. Posted at 2016-06-22 by tve Jum Jum you use the version that works for you :-) Posted at 2016-06-23 by Wilberforce
Are these inbound to the ESP8266 or outbound? Is it in AP mode Station Mode? When you say running out of memory - are you running out of heap? Posted at 2016-06-23 by tve Yup, out of heap. As soon as there is a network hiccup the buffers start accumulating and pretty soon it's cooked. Posted at 2016-07-09 by tve New build from espruino master but using SDK 1.5.4 patch 1 and having 1600 JS vars: http://www.espruino.com/binaries/travis/247bc37f92b64d68e5c95f356907b7538358dbad/espruino_1v86.tve_master_247bc37_esp8266.tgz Posted at 2016-07-11 by willguitaradmfar Good evening. With this version it does not connect with webIDE. "Espruino_1v86.tve_master_247bc37_esp8266.tgz" Grateful Posted at 2016-07-12 by @gfwilliams
Have you checked the baud rate setting? The Web IDE should be set to 115200 baud. Posted at 2016-07-13 by ExperimentalZeros NOTE: Please allow me to direct this post somewhere else within the ESP 8622 Forum if it is not appropriate for this "Conversation" trail. I am setting up Espruino @tve 1v86 version on the WeMos R1 D2 module. I have been able to pin (by trial and error) which pins do what Here is the list as an attached picture. The only things (so far) I have found not running are: 1.- AnalogRead(A0?) I found a post explaining what to update (".c" and ".h") for the I2C to work, but I really don't know how to build ESPRUINO yet.... on the AnalogRead I really don't know where to start. Any help that can be provided will be highly appreciated. Attachments: Posted at 2016-07-13 by ExperimentalZeros This is what I get every time I try to setup the I2C, it just dumps this data and resets:
Posted at 2016-07-13 by Frida You use:
Try:
I know that the bitrate gives a reset. Posted at 2016-07-13 by ExperimentalZeros @frida, or anyone That did it! I don't have a Logic Analyzer, but from your knowledge: 1.-What do you think the data rate will be? Is fixed to a specific value or it fluctuates? those questions matter as I would like to size the pull-up resistors accordingly. 2.- Do you by any chance know about AnalogWrite pin value or how to find it? I tried it to just put values starting at "A0" and kept on going (who knows how many iterations) without any luck. Thank you! Posted at 2016-07-14 by Frida 1: I do not have measuring equipment. Posted at 2016-07-14 by DrAzzy analogWrite should work on any of the normal pins, I think ( definitely not the adc pin). It's software pwm - I don't think hardware pwm is available? Posted at 2016-07-15 by tve ESP8266 info can be found here: https://github.com/espruino/EspruinoDocs/blob/master/boards/EspruinoESP8266.md Posted at 2016-07-16 by ExperimentalZeros @drazzy @tve I am very sorry, I meant to say analogRead()... but thanks for all the information!!! It has opened new resources I was not aware of! Posted at 2016-07-16 by DrAzzy Aaah, ya. Last I checked, analogRead read from the adc pin ( the only one it can read analog voltages on) regardless of what pin you told it to read. The adc is 0~1 volt only. Posted at 2016-07-17 by ExperimentalZeros Now I understand - I used to send it this way and it complained:
.... All I had to do was send it like this NOTE: On the WeMos website they mention that max on the analog read is 3.2v... we sill see. Thank you all! Posted at 2016-07-17 by DrAzzy The ADC pin itself is 0~1v only. I can't help but notice, however, that 3.2v is the maximum you'd be able to read if you used a voltage divider with 10k and 22k resistors (two common values) - maybe the board being referenced has that on it to make it easier for people to use the ADC? Posted at 2016-07-18 by ExperimentalZeros You are correct! Voltage Divider on-board! Thanks Posted at 2016-08-02 by user66681 Hello, im trying to flash the latest build but after flashing and reboot it ends up in and endless loop. Any idea ? Thanks in advance Juergen Attachments: Posted at 2016-08-02 by Ollie Are you using esptool to flash? Maybe do "erase_flash" first. This will clear any saved javascript code. I understand that sometimes addresses of stuff change between builds so you can't guarantee that previously saved code will run. Wiping the board entirely with erase_flash usually sorts problems like this. Posted at 2016-08-02 by user66681 Hi Ollie, thanks for your advise. It seems i got some ESP8266 Modules from AliExpress with less then 4MB. I have some modules with 4MB and it works fine. How can i erase the flash ? I just started to work with espurino and esptools. Posted at 2016-08-02 by Ollie Something like this
Note there is a different flashing command for smaller boards - 512k? Check the README_flash.txt included in the build's .tgz to make sure you're using the right command for your board. Posted at 2016-08-02 by user66681
Thanks a lot. Everthing works fine so far. Posted at 2016-08-05 by Kolban The first link on this page titled "reference section" seems to be broken. http://www.espruino.com/ESP8266_Flashing Posted at 2016-08-05 by tve Thanks, fixed, will appear with the next release. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-08-12 by ceremcem Hi @tve, Latest build seems to use espressif sdk 1.5, but README gives a command example for 1.4(b1):
When I load the firmware with the same command I was using before (which is just the same as in this README) by replacing
Loading seems to success though:
Posted at 2016-08-17 by conor I had same random characters on console as you when using the released v1.86 version. I got the latest build running ok with the following:
Posted at 2016-08-18 by ceremcem
This options didn't work for me with EditAs the latest build (1v86.171) uses Posted at 2016-09-08 by stephaneAG Hi there ! I just upgraded the flash chip on an ESP-01 ( yup ... ) to a W25Q128FV without too much hurdles, but I'm not confident in the settings to be passed to esptool.py during the flashing procedure .. what'd be needed to pull that off with the latest build ? my wild [ and uncomplete/errored ] guess:
*I'm really not sure about these, although the datasheet specifies a SPI clock rate ip to 104MHz, "dio" up to 208MHz & "qio" ( "and qpi instructions" ) up to 416MHz .. Attachments: Posted at 2016-09-08 by tve Assuming that the esp8266 and the bootloader support that size flash, then:
that should be 0xFFC000 esp_init_data_default.bin 0xFFE000 blank.bin There is no harm in you programming it for a smaller size to test and work your way up. Posted at 2016-09-08 by stephaneAG I hope so .. ( I'll know soon enough ;p ) Also, what's the underneath logic for the "0x[YY]C[YYY] 0x[YY]E[YYY] rule" ? I'l try your suggestion as soon as I get up after some rest ;) Thanks for the quick answer ps: not yet ready but it may be useful - sorry for messing with the branch troubles ;p Posted at 2016-09-08 by Spocki For those without the soldering skills, see here. Posted at 2016-09-08 by stephaneAG back :) from what I could read in the esptool repo:
*I'll digg esptool.py, but the lines 46..56 ( "add_spi_flash_subparsers" ) & 825..852 ( "write_flash" ) seems of interest, as well as the following links: espressif/esptool#105 , from a coment in previous link's page - spi_flash.h lastly, from the esp8266 datasheet: Attachments: Posted at 2016-09-10 by user67316 But only 1 meg for programs and possibly another meg for the OTA copy - the rest of the space could only be used for data - using for example the file system in the Arduino environment... Posted at 2016-09-17 by tve I created a fresh build using everything in v1.87 plus the latest Espressif SDK v2.0.0 with the latest patch. This build has crypto support but not graphics. Both just don't fit into flash :-(. The esp8266 runs at 160Mhz and Espruino gets 1700 jsvars. The free heap comes out to ~8KB and the build uses lwip_536 so packet buffers aren't as big as they would be otherwise. I have not done extensive testing, please let me know if I botched something. You can download the build from http://www.espruino.com/binaries/travis/b3dc05b5378a9182eea44e8c47b15c54e788037d/espruino_1v87.tve_master_b3dc05b_esp8266.tgz and I opened a PR for Gordon espruino/Espruino#925 Posted at 2016-09-18 by Wilberforce @tve Posted at 2016-09-18 by tve No, it had to drop because it never fit. It was in the previous build because someone just changed the max size in the makefile without considering whether there actually is space. So code overlapped the eeprom flash area and other stuff. Posted at 2016-09-19 by CrashingDutchman If I want to use graphics, then I would need to stay with an older build? Posted at 2016-09-19 by @gfwilliams More people may use graphics than crypto? Maybe we need a vote :) Of course I think you could use @jumjum's firmare builder? Posted at 2016-09-19 by Wilberforce Perhaps the bigger question is how many are using 512k roms vs 4mb. The restriction applies to 512k, and as this is the lowest common denominator and there is a common build, it applies to all esp8266 Posted at 2016-09-19 by tve The layout difference between 512KB and greater flash chips is only one 4KB sector, so just ditching 512KB support doesn't instantaneously fix the issue. Someone still has to go through and work out an alternate flash layout and then make all the code and documentation changes. I still see new folks start with esp-01 modules, FWIW. Posted at 2016-09-20 by @gfwilliams
Yeah, I'd say that with Telnet support the ESP01 modules are still pretty relevant. There must still be some easyish ways to get the code size down? There are ifdefs in the Math lib for cutting down on code size (with small but slow implementations of trig functions). And has anyone run Posted at 2016-09-20 by Wilberforce I thought the espruino math libs were no longer used and these were now linked to standard libs? I do recall when this happened there was a lot of space freed up in the total firmware sizes. Posted at 2016-09-21 by @gfwilliams It went through 2 phases:
So I think ESP8266 is currently using GCC's libs, but hasn't replaced the big ones with small ones. Posted at 2016-09-22 by JumJum See line 883ff in makefile, ESP8266 does not use GCC's lib Posted at 2016-09-22 by Wilberforce @jumjum Posted at 2016-09-22 by @MaBecker Or - download it from the source https://espressif.com/en/support/download/sdks-demos and choose "ESP8266 NONOS SDK V2.0.0 patch 20160809" and "ESP8266 NONOS SDK V2.0.0 20160810" Posted at 2016-09-23 by JumJum Thanks for hints,
Is there anything, I can get rid of those ? Posted at 2016-09-23 by stephaneAG Hi there answer from Greg Wang - Espressif Systems Customers service
( confirmation of / additional info on answer by Pete Scargill - as @user67316 - who were kind enough to share it on page 6 of this topic )
During my latest tests, I had troubles flashing a NodeMCU ( ESP-12 ) board with the "latest" releases of both esptool.py & Espruino, even using dio & slower bauds didn't seems to do the trick :| On the crypto vs graphics topic, I'd say both are relevant ( though I'd 1st have fun with graphics than the other .. even after watching some Bruce Schneier talk ;p ) - so, additional param when building ? @jumjum actually don't know if this 'd help, but try using '%zu' or casting as '(unsigned long)theUint32tVar' ? Posted at 2016-09-28 by Aleksandrs A have problem do not working .. on this hardware Attachments: Posted at 2016-09-28 by CrashingDutchman I think we need a bit more info @aleksandrs. Can you upload firmware or does even that give you errors? Posted at 2016-09-28 by Aleksandrs Yes sorry, this is NodeMcu V3 4M ESP8266, i Flash All WORK iN XUBUNTU. First STEP1. ./esptool.py --port /dev/ttyUSB0 erase_flash NEXT.. ./esptool.py --port /dev/ttyUSB0 --baud 9600 write_flash --flash_freq 80m --flash_mode qio --flash_size 32m 0x0000 boot_v1.6.bin 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin and photo Web IDE do not work Attachments: Posted at 2016-09-28 by CrashingDutchman Have you set baudrate in the IDE to 115200? You can find that under the radar-button and communications tab. Posted at 2016-09-28 by Aleksandrs Hello, many thanks bitrate now is 115200 and all working ... Posted at 2016-11-01 by alikxus Hi! Help me please. I have nodemcu v3 board with 1.86 firmware. Posted at 2016-11-01 by Ollie See this thread. It's not part of the ESP8266 build, but can be added if you can build it yourself. http://forum.espruino.com/conversations/292368/ Posted at 2016-11-16 by user70325 Hi All, I have 3 NodeMCU's V3 and flashed like explained above. Mine works in the IDE (Espruino Web IDE) but only if I publish. But as soon as I reset or power the board down. It looses all the code.... and yes I have the setting set to save to flash in the IDE. I tried multiple speeds (9600) included. (Code runs fine until reset or power down). Do I have to flash this with shorting points? What do I do? Thus far I have tried this on 2 of the 3 boards and both do the same thing. Posted at 2016-11-16 by Ollie Sounds like you need to use Posted at 2016-11-18 by user70325 Thanks Ollie I actually erase_flash again and did a clean install and now it works. But will try the save() method. Thanks again! Posted at 2016-11-27 by user70647 My code is :
i getting error :
please help me for this Posted at 2016-11-27 by @gfwilliams Looks like you turned on Posted at 2016-11-28 by user70647 Thanks @gfwilliams, my issue is solved. i just turn off NPM (Beta) from settings. Posted at 2016-12-16 by Mark I received from the aliexpress esp8266-01 -1M Attachments: Posted at 2016-12-16 by @MaBecker Hi @mark check http://forum.espruino.com/conversations/279294/#comment12691226 Posted at 2016-12-17 by Mark Hi MaBe. Posted at 2016-12-17 by @MaBecker sorry, no experience with -01 boards, using -12. You could setup up a building chain and use sdk 1.4 or 1.5 This is a good point to start README_Building.md Posted at 2016-12-17 by countxerox Hi, I'm trying to flash an ESP-12f board with espruino_esp8266_user1.bin from espruino_1v90_esp8266 which I got from the Download page. Seems to erase and flash ok but when conneting I get this error...
I flashed it just the same way I did for espruino_1v89_esp8266, with 1v90 I get the error with 1v89 I don't
Posted at 2016-12-17 by countxerox What's the difference between espruino_esp8266_user1.bin and espruino_esp8266_user2.bin? Posted at 2016-12-17 by AaronB user1 is written to the address for normal flashing user2 is flashed to a different address for flashing over wifi I believe. I've not flashed the latest firmware yet but use the NodeMCU firmware flasher, Posted at 2016-12-17 by AaronB I have the same issue, it is fine with the 1v89.28 travis build but its broken with anything newer. Posted at 2016-12-18 by user70647 Hello All, I try as following but still not work, is any one help me to know what I am doing wrong here :
Atmega8 code :
Posted at 2017-01-04 by user72090 Hi, i would like to try this firmware but seems that any idea?
i get the first error, then the nodeMCU v1.0 is flashing and seems that write the fw. i tried also with the gui tool that i use to load the LUA fw and look like the same, seems written and then is not working. I tried with version 1.6 of the loader and 1.4(b1) but same result. when i connect to the serial i get only strange char... please any idea? :( Posted at 2017-01-04 by @MaBecker @user72090 try Posted at 2017-01-04 by user72090 now it works: i used the version 1.5 but also changed to dio instead of qio. (i'll try the 1.6 but i suspect that 1.5 it's better.) 1.5 without "--flash_mode dio" does not work. this is the command:
Posted at 2017-01-05 by @MaBecker you can also check file README_flash.txt how to flash ESPs with esptool.py and wiflash Posted at 2017-01-06 by Frida with the latest version of:
and download today of:
I flashed esp8266-01 with this setup:
then:
and are up running, but I had to restart before webide would run. AS you see, it is with boot_v1.6.bin.
Posted at 2017-01-07 by @MaBecker Hmm - let me check - does not work for ESP12 erase_flash
write_flash:
Posted at 2017-01-07 by Frida From README_flash.txt:
Yours:
I don't have a 12'er, but you use:
and in the text:
Could it be it? Posted at 2017-01-07 by @MaBecker Yes this typo caused to reset loops - thanks for checking ! It also works with https://github.com/espressif/esptool which is version 1.3
Posted at 2017-01-09 by SeanL I have the same problems like countxerox http://forum.espruino.com/comments/13373836/ Posted at 2017-02-10 by Planer Hi to masters! I have trouble whith esp8266 12F FW1.91 espruino. (While: process.memory() = {"free": 908, "usage": 792, "total": 1700, "history": 441}) I use simple mqtt client sample from original documentation espruino.com/MQTT What i do invalid? Why is not free space? How to resolve this problem? My code:
Posted at 2017-02-10 by Ollie Replied on Gitter. It's not a good idea to post same question in multiple places in the forum. One post will generally get you all the help you need in here. More only confuse the discussion. Posted at 2017-02-11 by navas 1v91 works good for me, has been running since 23 days, pretty stable so far... Thanks Posted at 2017-03-10 by @gfwilliams Locking this thread now. 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 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-18 by tve
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?
Beta Was this translation helpful? Give feedback.
All reactions