Error when saving to flash #1949
Replies: 43 comments
-
Posted at 2016-12-19 by stevie4711 More information: When typing load (which I just learned about :-) ) it outputs the following:
Seems to support my thesis... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @MaBecker @stevie4711 check section http://www.espruino.com/Puck.js try a couple of times, if it does not work the first time. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by stevie4711 Yes, I tried that but it does not change anything. The thing is, I can interact with it just fine. Just when trying to save to flash or trying to read from flash it acts up. I was thinking about using the Flash module to erase things, but don't really know the address to erase and what to write there. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @MaBecker check boards/PUCKJS.py - section 'saved_code' : { |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by stevie4711 Brilliant!!!! That did the trick. I did the following according to the location of the saved code: flash.erasePage((120 - 3) * 4096) And now everything is back to normal. Thanks a lot! Maybe some "eraseCode" function might be helpful. Unless it's there and I just overlooked it like the "load" function. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-20 by @gfwilliams I'm pretty sure it's because you were using 'save on send' in the IDE as well as Basically 'save on send' writes the raw JS code straight into flash memory, and if you use a function it then references that memory rather than copying the code straight out. That's fine, but if you then type
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-20 by stevie4711 Actually I never used the 'save on send'. So I don't think that was the reason for the corruption. Also 'E.setBootCode()' also crashed immediately, so I couldn't even type the reset(). But for now everything seems to be fine. I'll observe if the same thing happens again. But it's good to have a way out, should it ever happen again. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by @gfwilliams Thanks! I actually had this issue just now, and as you say the following lines do fix it:
Both Please, if anyone has this happen again, please can you post up what you did beforehand that may have made it happen? I'd really like to find a way to reproduce this so I can get to the bottom of it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by stevie4711 Hi, my Puck had the same thing happening again on the Puck which was showing it initially, just yesterday. Actually at some point I had it happening on all three. I think I did nothing special, just upload new code. Two things which are just impressions without being sure:
Just wanted to stress that there is no evidence about the impressions above. I was not able to reproduce it systematically. Thanks! One more things: Doing a dump() in that situation showed first the normal code and then an endless line of those Yen characters being dumped to the Web UI. It looks like a missing '\0' character at the end or so. Again, just an impression. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by @gfwilliams Thanks! Yes, I think I know the change that caused it (allowing If you get it again, please could you run |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by stevie4711 Okay, I will do that! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by ChristianW I had some similar issues here http://forum.espruino.com/conversations/297205/ Have looked at it again and have a 100% reproduction procedure: 1. Setup WebIDE:
2. copy into code pane (RHS) and click [^Send]
Left console shows:
Result: red LED is flashing, dump shows this:
3. try
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by @gfwilliams I'm pretty sure that is because of what I said earlier: http://forum.espruino.com/conversations/297591/#13376991 I just tried this and it's easily fixed by typing The thing @stevie4711 has is different though - it can't be recovered with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by @gfwilliams @christianw thanks - I just discovered a bug in how The next version of the firmware should have that fixed. There's a beta firmware with it fixed here: http://forum.espruino.com/conversations/297615/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-21 by stevie4711 Hi @gfwilliams, would that only apply to @christianw's problem or also to mine? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-13 by @joakim I just had this issue in a 1v91 flashed puck (not the Uncaught Syntax error, but disconnections on The peek functions return the same as the others here, and the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by @gfwilliams Next time it happens, please could you do:
And post up what it reports? That'll dump all the contents of the saved code area (which will probably take 30 seconds or so), but it should help me reproduce what's happening. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by Adam79 Having similar issues, I've been setting NRF Services and trying to save the code getting disconnects. I've manged to do a reset ( insert battery, hold button, wait for self test to finish ) then ran your code above and tried a save() ... disconnected. I think only the last part of the log is the interesting part "BT> SEND ERROR: NotSupportedError: GATT operation failed for unknown reason."
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by Adam79 @gfwilliams Im not sure what the difference is but once a save from the command line stops working the only way I can get it back it be blanking out the code window and setting save on load and saving. Once that save is done, running save() on the command line works !
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by @gfwilliams @adam79 what I'm after is what's printed on the left hand side of the IDE. It should look like:
But probably without the FFs - you want to just paste the code right into the left hand side (not upload via the right). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by Adam79 @gfwilliams a dead end ?
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by Adam79 also a reconnect after is non responsive, but a second connection works
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by Adam79 and the code
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by @gfwilliams Actually no, that looks like it's helped a huge amount :) I just reproduced it (deleted the first flash page, so my working Puck looked just like yours) and So I'm pretty sure I know what the problem is and I can get a fix done for it - I'll try and get something sorted tomorrow morning. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-17 by @gfwilliams Ok - thanks for you help! It's fixed now - it'll be in the 1v92 release |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-17 by Adam79 Winner ! :-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-17 by Adam79 @gfwilliams do you have an ETA on 1.92 ? I've hit another issue which I'm hoping 1.92 fixes. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-17 by @gfwilliams What is it? If it's different problem then please can you post up in a new thread? 1v92 might be a week or two unless the saving is really causing a lot of trouble - right now there aren't any other fixes in it. At some point I'll try and get cutting-edge builds for it set up - at least then it'd be easy to check out the current changes. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-17 by Adam79 UPDATED: think the issue is an xcode caching issue Yesterday I was developing an IOS app that connects to the puck and was working fine. I then hit the save issues. Now my app is getting null values when querying the services characteristics. Using Ligthblue (ble app) from OSX I can read the values fine. console output from xcode
I believe the issue started when playing with notify: true with the characteristics on the puck side of things, but with the save issue and this bug I lost track a little. So I was going to wait for 1.92 before I fully looked into the issue. Also is there a function to list the pucks current services/characteristics ? without using external software ? something like NRF.getServices() ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-17 by @gfwilliams I'm afraid there isn't anything to list the services/characteristics - Espruino hands them over to the Bluetooth stack and it's a bit of a pain getting full info back. But if you have any other issues with this, could you start a new thread? This one's already getting pretty confusing for anyone trying to find out why |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by stevie4711
Hi @gfwilliams,
one of my Pucks has started acting weird: Suddenly when saving code it crashed. Since then after typing reset() it will output the following:
Also whenever I try to write to the flash memory it will crash. Either by typing save() or by using E.setBootCode(). My only theory is that either the flash memory is damaged or that it was somehow corrupted and the Puck firmware cannot deal with that.
Note that except for those things it works fine. I also tried to replace the firmware with a new version, but that did not help. I am using the newest firmware. The self test is also okay, but I guess that really only checks for shorts between the exposed pins. Any idea how to check if the flash is damaged? If that's the case any idea how to fix / workaround that. Maybe by not using damaged pages?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions