-
Has anyone tried compiling Espruino with FS enabled? It used to work, but after something like 1.93 it started freezing up the ESP8266 after flashing. I found it was pretty usable still with 1550 JSVars. this would be really a much more elegant solution than the flash storage module.
Also from looking at the thread, it looks like there are unresolved issues with the flash storage module that were left hanging...
-
@Polypod Also the first one has a proper F antenna, which -- unless I am mistaken -- results in better radio performance.
-
I've never seen any polls to my recollection on the forum here. That might be interesting -- though not definitive, for you. Put up a bunch of options that you think might be interesting and then you can always choose to just ignore the results anyways :P
I for one would love to have the "espruino watch", on there as a voting option :P
-
@Wilberforce @Gordon As I said before I uploaded just:
console.log("hello");
And this was from a virgin ESP that I flashed with a recent version of Espruino (you can look above).
As far as I know that shouldn't do anything. So are there default modules.js that are loaded before my code? Something else?
-hfc
-
@Wilberforce Maybe we're getting warmer. So to summarize:
1/ If I do not use "Save On Send" -- IE: disable the feature in question, all is normal. There are absolutely no problems.
2/ If I DO enable "Save On Send", then AFTER all the code has been uploaded (looking at the green bar in the lower right in the Web IDE), and AFTER the message (suggesting the code has been saved to flash successfully):
>Erasing Flash.................. Writing... Compressed 25600 bytes to 31 Loading 31 bytes from flash... Uncaught InternalError: Not connected to the internet
the ESP8266 gives us an endless stream of "Not connected to the internet".
3/ If I unplug the ESP module and plug it back in, none of my code executes, however I have the normal Espruino prompt. At this point if I do "dump()" I get the message:
Connected > >dump() // Code saved with E.setBootCode =undefined >
so then if I type "load()". I get the following:
>dump() // Code saved with E.setBootCode =undefined >load() =undefined Loading 31 bytes from flash... Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet
So it definitely seems to be something about the initialization and loading of the code.
4/ If I save the code normally (IE: without the feature in question enabled), I can easily always reset() and load() code without any problems (and do so frequently for debugging purposes etc).
So this suggests to me there is something about either Save on Send, or something about E.setBootCode() which is implicated in this. Again, not sure.
-
@Wilberforce This wouldn't apply to virgin modules (stock Espressif firmware), which you then erased and flashed with Espruino, would it? This is what I've been using mostly. Anyways as I mentioned, E.setBootCode("") doesn't fix the problem....
-
Interestingly if I press the reset button the board I get the following:
>;ld|dà|Ädìc<ì{ÛcÄ#ónglgnãìcp${$sdpò'àlcoã<cûgnçdÄÇd`'l`orÇ'd`8ûoà;Üãàb'ã|äÇcû'oîd`ogl n{glxóoà{ãàälcgã|cûg'çl no$`g{ol`rÛgl`{lnûgnãÄ{'ogÄdÄcdì$ä$dl{lällloãddldì$ÄnàoìÛo~ldàbì$dpcÃcrìd`ol8ìl cd`$'gÛãnl|l$`sdãänì{ûo|äll`ã{dþLoading 31 bytes from flash... > =undefined >
and can play around with the command prompt as normal. But if I do a reset () / load () the error comes back as follows:
> =undefined >reset() =undefin _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v92.902 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >load() =undefined Loading 31 bytes from flash... Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet
Interestingly, if I use E.setBootCode to erase the flash the problem doesn't go away:
E.setBootCode("") Erasing Flash.................. Writing... Compressed 25600 bytes to 8 Checking... Done! > =undefined >reset() =undefin _____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v92.902 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >load() =undefined Loading 8 bytes from flash... Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet
So not sure.
-
For me, its always the same Gordon. It doesn't matter which board I try (ESP-01, WeMos D1 Mini (ESP-12F), today the ESP Witty (ESP-12F), it always produces the the same error:
"Uncaught InternalError: Not connected to the internet"
So I'm on a Chromebook and using the Web IDE. And just now I plugged in an ESP Witty (basically just a 12F module), and uploaded the following code:
console.log("hello");
What I got back was:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v92.902 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >Erasing Flash.................. Writing... Compressed 25600 bytes to 31 Loading 31 bytes from flash... Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet
etc etc. I have no idea if anyone else experiences it. I thought to go through the Espruino source, but I'm a bit wrapped up with projects right now, and don't have time to learn how to debug at that level, yet.
-
Interesting! I actually contacted the sellers of the ID107 and had a similar experience to the gentleman that was writing the post above. They told me I had to order some large quantity, and tried to sell me new watches that were not the same. So dead end there.
There are some on ebay --- and I'm moving and these things take forever to arrive. But I'm encouraged that people are really into modding this little platform. The more I think about it the more I'd really love to have espruino on a watch like that.
Anyways keep us informed of any tinkering -- I'll be watching with interest for sure. I won't be able to work on anything for a few weeks anyways until after I've finished moving.
-
-
-
@Gordon Ok thats really interesting. For JSCrush -- I didn't think about that -- but yes it does actually use a textarea to buffer its output before putting it all back together. So I'm not sure how you would get around that. Also thanks for the details on the compiling. As for your suggestion about banning character codes above 128 -- that's a little bit bigger than a rainy day project :P Maybe I'll hack around with it at some point :)
@tom.gidden Interesting feedback. I'd be surprised if something interesting couldn't be done with 350 JSVars on the micro:bit -- though your point about libraries is well taken. I'll play around with it -- I have a BME280 I'd like to hook up to it...
-
So I guess thats not it, as I made a copy of an ESP8266_4MB.json (based on ESP8266_BOARD.json in espruino.com/json) and put it on one of my servers, and the IDE found it fine and same error occured.
I also reflashed my chips to stock V92 (non 4MB version), in the hopes that would change something, but this didn't work either.
So a bit mysterious. Another ideas of what I could test?
Has anyone else tried this feature on an ESP8266, and what has been the result?
Thanks again :)
=hfc -
Thanks for this explanation -- it was VERY helpful :)
So I basically managed to reduce my entire code to:
console.log("hello");
and it was still the same error. Your suggestion of looking at the logs was good and I may have found the problem. Basically it appears at one point to look for an ESP8266_4MB.json at the http://www.espruino.com/json/ ,but there isn't one there, as it would appear that its not been updated (ie: there's a board in GitHub for this board, but not in the /json directory online).
Could this be it? I can't get my code much smaller than one console log :P And yes I did reflash the board each time before I did this, to make sure I started from virgin state on the board.
GET chrome.storage.sync = {"AUTO_SAVE_CODE":true," BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"|bluetooth|robot|","BLOCKLY_LANGUAGE":"en","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"console.log(\"hello\");\n\n","COMPILATION":true,"COMPILATION_URL":"http://www.espruino.com:32766","ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"SIMPLE_OPTIMIZATIONS","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":true,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"SIMPLE_OPTIMIZATIONS","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","NPM_MODULES":false,"OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":"1","SERIAL_AUDIO":"0","SERIAL_TCPIP":"","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":false,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEB_BLUETOOTH":true} Initialising SettingsConsole Initialising Utils Initialising Config Initialising Notifications Initialising Status Initialising App Initialising File Initialising Code Initialising Serial - Initialising Serial Chrome Serial - Initialising Serial Chrome Socket - Initialising Serial Audio - Initialising Serial Web Bluetooth Initialising Terminal Initialising CodeWriter Initialising Modules Initialising Env Initialising Flasher Initialising EditorBlockly Initialising EditorJavaScript Initialising Send Initialising MenuPortSelector Initialising MenuSettings Initialising MenuFlasher Initialising SettingsAbout Initialising SettingsFlasher Initialising BoardJSON Initialising VersionChecker Initialising Compiler Initialising Assembler Initialising GetGitHub Initialising NPMModules Initialising SetTime Initialising Unicode Initialising Minify Initialising SaveOnSend Initialising Tutorial Initialising Webcam Initialising FontSize Initialising UiMode Initialising URLHandler Initialising CodeLink Initialising Project Initialising Testing Initialising Notification_Sound Initialising Tern Initialising Debugger Initialising Tour Initialising SettingsProfile Initialising HelpLinks Initialising Offline Loaded code from storage. GET chrome.storage.local.OFFLINE_DATA = 0 bytes >>> Connecting... Set Slow Write = true [object Object] Connected [object Object] Found a prompt... great! >>> Sending... ---> "\u0010console.log(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n" >>> Sent Got "< << {\"VERSION\":\"1v92.902\",\"BUILD_DATE\":\"May 25 2017\",\"BUILD_TIME\":\"14:26:02\",\"GIT_COMMIT\":\"c234c0083c12697aef6cb5b48ad8199e8bdadfb2\",\"BOARD\":\"ESP8266_4MB\",\"CHIP\":\"ESP8266\",\"CHIP_FAMILY\":\"ESP8266\",\"FLASH\":0,\"RAM\":81920,\"SERIAL\":\"60019400-6edd\",\"CONSOLE\":\"Serial1\",\"EXPORTS\":{\"jsvLock\":1075850808,\"jsvLockAgainSafe\":1075850968,\"jsvUnLock\":1075852352,\"jsvSkipName\":1075862264,\"jsvMathsOp\":1075868128,\"jsvMathsOpSkipNames\":1075869824,\"jsvNewFromFloat\":1075859684,\"jsvNewFromInteger\":1075859584,\"jsvNewFromString\":1075859284,\"jsvNewFromBool\":1075859652,\"jsvGetFloat\":1075865904,\"jsvGetInteger\":1075861588,\"jsvGetBool\":1075866264,\"jspeiFindInScopes\":1075882632,\"jspReplaceWith\":1075882332,\"jspeFunctionCall\":1075893188,\"jspGetNamedVariable\":1075884476,\"jspGetNamedField\":1075884920,\"jspGetVarNamedField\":1075885052,\"jsvNewWithFlags\":1075859016}} >> >\r\n>" Loading http://www.espruino.com/json/ESP8266_4MB.json ERROR: Not Found Board JSON loaded Set Slow Write = true Device found (connectionId=1) [success] Connected to port /dev/ttyUSB0 >>> Connected to port /dev/ttyUSB0 [notify_info] No error. Minifying 23 bytes to 22 bytes. Save on send transformed code to: E.setBootCode("console.log(\"hello\");\n");load(); Found a prompt... great! >>> Sending... ---> "\u0010reset();\n\u0010E.setBootCode(\"console.log(\\\"hello\\\");\\n\");load();\n\n" Splitting at "reset();\n", delay 250 >>> Sent Disconnect callback... WARNING: [notify_warn] Disconnected >>> Disconnected Splitting at "\u0003", delay 250 >>> Connecting... Set Slow Write = true [object Object] Connected [object Object] Received a prompt after sending newline... good! WARNING: No result found - just got "\bUncaught InternalError: Not connected to the internet\r\n>\bUncaught InternalError: Not connected to the internet\r\n>\bUncaught InternalError: Not connected to the internet\r\n>\bUncaught InternalError: Not connected to the internet\r\n>\bUncaught InternalError: Not connected to the internet\r\n>\bUncaught InternalError: Not connected to the internet\
If this is true though it raises another issue. The IDE will freak out with ANY custom board that you make (I have a couple with different JSVars and stuff). Can I put these in a local directory, and where would be the best place?
Thanks again :)
=hfc -
Also I noticed recently that there was a "compile" option built into the IDE (using "compile" in your code) for the Nordic chips -- I assume it doesn't work with the ESP series. But for the micro:bit, would there be an advantage to using this feature? I understand it works on just a subset of the implemented javascript, and is more aimed at gaining speed, than memory...
-
Well the font is smaller for sure :P
OK thanks for that tip about E.setBootCode(""), I'll add it to my Espruino cook book :P
I'll have a look, its an IR controlled WS2812 light (using the "IRReceiver" module), but that code doesn't do much internet wise except run Wifi.stopAP() at the beginning, and elsewhere Wifi.startAP(), so I can telnet in and modify it.
But why would the code run fine if "Save On Send" is disabled? Maybe I'm not understanding some subtleties about the feature.
-
You can see how that's not desperately compelling :)
@Gordon - I guess it depends on your revenue model. You already have Patreon (from I presume non "Official Board" owners even), and there could be other services you provide that are not part of the open source distro that would be cheap, but doable ($1 a month), etc, a custom firmware builder for commercial use, whatever. Anyways, off topic, but somewhat relevant.
@Ducky +1 for renewing the domain btw, if that wasn't obvious. :P I didn't use it much, because I thought it would go "away", but if I know it will be around for a year or two I will for sure.
-
Ok thanks for that tip! Rereading the thread, I see that you ordered a watch that was originally probably made by these guys:
https://ido-smart.en.alibaba.com/
I'll do some research.
Speaking of an nRF52 based watch -- I noticed there was alot of interest in a wearable Espruino in this thread-- maybe an opportunity for you after puck.js? ;)
hfc
-
So I built the IDE successfully -- and now it minimizes! Great!
However in the end it seems to complain about not having a connection to the internet?
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v92.876 Copyright 2016 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 >Erasing Flash.................. Writing.......... Compressed 24800 bytes to 7447 Checking... DonLoading 7447 bytes from flash... Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the internet Uncaught InternalError: Not connected to the intern
I did this a few times and always the same result. Tried both options in Save On Send (including the execute after reset()). Not sure if anyone else has had this problem.
Disabling "Save On Send" acts as normal and my code runs. I had to reflash my board after, btw. Not sure why, resetting with rst cause 4, after a normal upload. Then it would boot normally with my code, but was weird, so I just reflashed it. These flash chips are notoriously unreliable, so I'll look into that.
Also, is the font smaller on the new version?
-
@Gordon How did this end up? I'm thinking of buying one:
anything I should know before flashing it? :)
-
Thats great to know! I suspect I'll agree with you about the 300 vars on that platform, especially for kid projects, so will order a couple of micro:bits to start playing with them...I'll order a puck.js soon as well -- it looks REALLY cool. The low power consumption is particularly compelling on it.
OK, cool. I'll try that out then -- thanks guys :)